Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Loop over report design with new data
hgk
Hi All,
I want loop over the same report design with different scripted datasource and create and single pdf report.
Here is how I am creating my report with one scripted datasource:
IReportRunnable design = birtEngine.openReportDesign("sat.rptdesign");
IRunAndRenderTask task = birtEngine.createRunAndRenderTask(design);
task.getAppContext().put(
EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
MyClass.class.getClassLoader());
task.getAppContext().put("satDS",scriptedDS);
task.setParameterValue("Title", str);
task.setRenderOption(options);//xyz.pdf report
task.run();
Please provide a sample for looping over report design with different scripted datasource in each iteration.
Thanks,
hgk
Find more posts tagged with
Comments
hgk
Is it possible to loop over the same report design with a different scripted datasource in each iteration and create a single pdf report?
Thanks,
hgk
bhanley
If the schema produced by each of the Data Sources is identical, the design would stuill produce valid output. If the schema produced from one source to another differs, you will not be able to swap them out.
hgk
Thanks for your reply. My report design has lots of tables, images, grids and labels. The tables and grids are populated by the scripted datasource. I also pass parameters for the labels. I have to set new images, parameters and scripted datasource in each iteration. The APIs of the datasource is not going to change. Only the data will change in each iteration.
Could you please provide a sample for this. I am not sure if I should create a new IRunTask or new IRenderTask in each iteration. I am not sure where I should be setting images, parameters and datasource in each iteration. I want to write the output of each iteration to a single file.
Thanks for your help,
hgk