Skip to main content



      Home
Home » Archived » BIRT » Headers and other fields in CSV Generated Report(NOt all headers and other labels are seen in my CSV File)
Headers and other fields in CSV Generated Report [message #1625070] Fri, 20 February 2015 00:59 Go to next message
Eclipse UserFriend
Hi ,

I am trying to generate a csv file from the Classical Model . I create my csv file using ICSVDataExtractionOption and IDataExtractionTask .
When i view the CSV file ,I am only able to see the fields that are linked with the dataset elements and not the Header Rows defined in the rptdesign.



Sippets of my code are : -

ICSVDataExtractionOption extractionOptions = new CSVDataExtractionOption();
extractionOptions.setOutputFormat("csv");
extractionOptions.setSeparator(",");
extractionOptions.setOutputStream(output);
IDataExtractionTask iDataExtractTask = (IDataExtractionTask)task;
iDataExtractTask.extract((IExtractionOption)options);

We are using WebLogic 10.3.6 as App server for deploying and Java version is 1.6.

Can anyone explain me , why might this be happening ?

Attached is my rptdesign and an image index.php/fa/20925/0/ of what i want to achieve .
Re: Headers and other fields in CSV Generated Report [message #1630963 is a reply to message #1625070] Mon, 23 February 2015 09:03 Go to previous messageGo to next message
Eclipse UserFriend
Does no one have any idea about this issue Sad ???

Re: Headers and other fields in CSV Generated Report [message #1633336 is a reply to message #1630963] Tue, 24 February 2015 15:30 Go to previous messageGo to next message
Eclipse UserFriend
I think there have been several responses to this question on here and the BIRT Developer Center. You'll need to create an emitter for CSV, not use the data extraction task. That simply pulls the data from the data set. It doesn't output the report design.

Hope this helps.
Re: Headers and other fields in CSV Generated Report [message #1651637 is a reply to message #1633336] Thu, 05 March 2015 07:18 Go to previous message
Eclipse UserFriend
I am using CSVEmitter , yet I do not get the intended result .

This is my code ... Any Help ?

IReportRunnable design = null;
try {
design = BirtEngineHolder.getBIRTEngine().openReportDesign(document.getReportRunnable().getReportName());
} catch (EngineException e) {

e.printStackTrace();
}
IEngineTask task = BirtEngineHolder.getBIRTEngine().createRunAndRenderTask(design);
ObjectOutputStream om = new ObjectOutputStream(new FileOutputStream(myCsVFile));


CSVRenderOption csvOptions = new CSVRenderOption();


csvOptions.setOutputFormat("csv");
csvOptions.setDelimiter(",");
csvOptions.setOutputStream(om);
csvOptions.setShowDatatypeInSecondRow(true);

IRunAndRenderTask runAndRenderTask=(IRunAndRenderTask) task;
runAndRenderTask.setRenderOption((IRenderOption) csvOptions);
runAndRenderTask.setEmitterID("org.eclipse.birt.report.engine.emitter.csv");

runAndRenderTask.run();
Previous Topic:How to generate rptdocument with streaming
Next Topic:Cash when deploy a report that uses a library
Goto Forum:
  


Current Time: Sat Mar 22 23:44:49 EDT 2025

Powered by FUDForum. Page generated in 0.02892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top