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)
Producing Multiple Report from one Report
Birtboogie
<p>Hi,</p>
<p> </p>
<p>BIRT Newbie here,</p>
<p> </p>
<p>I am looking to be able to produce multiple reports from one report data source.</p>
<p> </p>
<p>The data source is XML and would need to print a separate report for each customer ID.</p>
<p> </p>
<p>can anyone help?</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Mark</p>
Find more posts tagged with
Comments
Clement Wong
<p>Are you using commercial, or open source BIRT? What version?</p>
<p> </p>
<p>You'll need a driver report that can burst (create additional) reports. Have you seen these DevShares?</p>
<p> </p>
<p>For commercial:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/762-report-bursting-with-birt/'>http://developer.actuate.com/community/forum/index.php?/files/file/762-report-bursting-with-birt/</a></p>
;
<p> </p>
<p>For open source:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/630-burst-pdf-report-using-script/'>http://developer.actuate.com/community/forum/index.php?/files/file/630-burst-pdf-report-using-script/</a></p>
;
jsekhon
<p>Did not work.</p>
Clement Wong
<blockquote class="ipsBlockquote" data-author="jsekhon" data-cid="147071" data-time="1489172156">
<div>
<p>Did not work.</p>
</div>
</blockquote>
<p> </p>
<p>Can you provide more details?</p>
<p> </p>
<p>What did not work? What version are you using? What did you try?</p>
jsekhon
<p>Using Birt Luna 4.4.0.</p>
<p> </p>
<p>I used the same example with changed the paths . No bursted reports where generated.</p>
<p> </p>
<div>importPackage(Packages.org.eclipse.birt.report.engine.api);</div>
<div>var re = reportContext.getReportRunnable().getReportEngine();</div>
<div>var des = re.openReportDesign("c:\Burstreportfoldersfiles\burstdetail.rptdesign"); </div>
<div> </div>
<div>var ntask = re.createRunAndRenderTask(des);</div>
<div>ntask.setParameterValue("CustomerNumber", parseInt(this.getRowData().getColumnValue(0)) );</div>
<div>var options = new PDFRenderOption();</div>
<div>var outputfile = "c:\Burstingexample" + this.getRowData().getColumnValue(0) + ".pdf";</div>
<div>options.setOutputFileName(outputfile);</div>
<div>options.setOutputFormat("pdf");</div>
<div>ntask.setRenderOption(options);</div>
<div>ntask.run();</div>
<div>ntask.close();</div>
jsekhon
<p>Clement can you suggest what can I do to get it working.</p>
pricher
<p>Hi,</p>
<p> </p>
<p>Couple of things you can try:</p>
<p> </p>
<p>1. Use forward slashes instead of backslashes in the openReportDesign method and the outputFile variable:</p>
<p>2. Remove the parseInt method in the setParameterValue method</p>
<p> </p>
<p>The following script works for me:</p>
<pre class="_prettyXprint _lang-">
importPackage(Packages.org.eclipse.birt.report.engine.api);
var re = reportContext.getReportRunnable().getReportEngine();
var des = re.openReportDesign("c:/xfer/burstdetail.rptdesign");
var ntask = re.createRunAndRenderTask(des);
ntask.setParameterValue("CustomerNumber", this.getRowData().getColumnValue(0));
var options = new PDFRenderOption();
var outputfile = "c:/xfer/test" + this.getRowData().getColumnValue(0) + ".pdf";
options.setOutputFileName(outputfile);
options.setOutputFormat("pdf");
ntask.setRenderOption(options);
ntask.run();
ntask.close();
</pre>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
Virgil Dodson
<p>I also had to change the CustomerNumber from String to Int in the detail report to get it to work.</p>
jsekhon
<p>Thanks. It worked.</p>