Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Creating CSV from rptdocument
nishant_mintri
<p>Hi ,<br><br>
I want to generate a CSV file ,using ICSVDataExtractionOption and IDataExtractionTask .<br>
When I try to generate the same , the columns in my csv files appear in Random Order.<br>
(If my Columns are labelled as 1,2 and 3 then my csv file displays it as 2-1-3 or any order other the CORRECT order of 1-2-3)<br>
But if I use ExcelEmitter to generate an excel file , my columns are in the correct order.<br>
Can anyone tell me why would this be happening ?<br>
Sippets of my code are : -<br><br>
ICSVDataExtractionOption extractionOptions = new CSVDataExtractionOption(); <br>
extractionOptions.setOutputFormat("csv");<br>
extractionOptions.setSeparator(",");<br>
extractionOptions.setOutputStream(output);<br>
IDataExtractionTask iDataExtractTask = (IDataExtractionTask)task;<br>
iDataExtractTask.extract((IExtractionOption)options);<br>
<br>
We are using WebLogic 10.3.6 as App server for deploying and Java version is 1.6.</p>
Find more posts tagged with
Comments
mwilliams
<p>What is the order of the data in your data set? Have you rearranged the columns in your report design?</p>
<p> </p>
<p>If the order isn't different in your layout vs your data set, is there any other obvious ordering going on, like alphabetical?</p>
mwilliams
<p>You might also look at changing the order of the bindings in the binding tab of the property editor to see if that changes the output order.</p>
nishant_mintri
<p>Ok ...I got it ... the xml file had a different ordering of the colmns , so I was getting the problem ... rearranged it in the xml and got the results ....Thanks for the help :-)</p>
mwilliams
<p>You're very welcome! Let us know whenever you have questions.
</p>