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
Designing Analytics Reports
save pdf on server after Report Rendering / Factory
Migrateduser
<p>Hi everbody,</p><p> </p><p>I use an interactive Report with a lot of html text fields, so the user could make some changes. After the user has finished I put the text fields (= parameters of the second Report) into a href link and render a Second-Report.</p><p> </p><p>After the second report is rendered it should save a pdf file on server side automatically. For this purpose I use the ReportEngine with this script:</p><pre class="_prettyXprint _lang-js">importPackage(Packages.org.eclipse.birt.report.engine.api);var re = reportContext.getReportRunnable().getReportEngine();var des = re.openReportDesign("C:/personal1.rptdesign"); var ntask = re.createRunAndRenderTask(des);ntask.setParameterValue("createPDF", false);ntask.setParameterValue("Vorname", params["Vorname"].value);ntask.setParameterValue("Nachname", params["Nachname"].value);var options = new PDFRenderOption();var outputfile = "C:/birt43/ReportEngine/samples/test.pdf";options.setOutputFileName(outputfile);options.setOutputFormat("pdf");ntask.setRenderOption(options);ntask.run();ntask.close(); </pre><p>Because I have a lot of parameters and after rendering all parameters are known, my question is:</p><p> </p><p>Is it necessary to initialize every parameter in this script with "ntask.setParameterValue", or is there an easier method to call all parameters? Also this script run and render the report again. Maybe there is an other way to solve my issue.</p><p> </p><p>The purpose is after render save a pdf file on server side automatically.</p><p> </p><p>I´am looking for your answers.</p><p> </p><p>best regards</p><p>rjf</p>
Find more posts tagged with
Comments
There are no comments yet