Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
CSV emitter doesn't work as separate Render Task
Migrateduser
Hi all,
I can successfully render to CSV by doing a single RunAndRenderTask, but I want to render to PDF, CSV and HTML at once, without re-running the queries in my reports.
The HTML and PDF export just fine, but the CSV file is blank. I'm using BIRT 2.2.1, and not using the WebViewer. Here's the rendering code I'm using:
//Create Render Task
IRenderTask renderTask = engine.createRenderTask(rptDoc);
// set up rendering uptions for CSV
CSVRenderOption optionsCSV = new CSVRenderOption();
optionsCSV.setOutputFormat( CSVRenderOption.CSV );
optionsCSV.setOutputFileName(outputFilePathCSV);
renderTask.setRenderOption(optionsCSV);
// render
renderTask.render();
// set up rendering uptions for PDF
HTMLRenderOption optionsPDF = new HTMLRenderOption();
optionsPDF.setOutputFileName(outputFilePathPDF);
optionsPDF.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);
renderTask.setRenderOption(optionsPDF);
// render
renderTask.render();
HTMLRenderOption optionsHTML = new HTMLRenderOption();
optionsHTML.setOutputFileName(outputFilePathHTML);
optionsHTML.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
renderTask.setRenderOption(optionsHTML);
// render
renderTask.render();
renderTask.close();
I've tried placing the CSV render Task first and last but all I get is an empty file.
Anyone come across this before ? Can you shed any light ?
Many thanks,
Keith
Find more posts tagged with
Comments
There are no comments yet