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
Problems getting report data to display
Migrateduser
I've got the following code, which is attempting to write a pdf to the file system:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
ServletContext sc = request.getSession().getServletContext();
this.birtReportEngine = BirtEngine.getBirtEngine(sc);
IReportRunnable design;
//Open report design
design = birtReportEngine.openReportDesign( sc.getRealPath("/Reports") + "/grant-application.rptdesign");
//create task to run and render report
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design );
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, CreateGrantAppReportRequestHandler.class.getClassLoader());
task.getAppContext().put("BIRT_VIEWER_HTTPSERVLET_REQUEST", request );
PDFRenderOption options = new PDFRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);
options.setOutputFileName("c:\\fws\\reporting\\docs\\testing.pdf");
task.setRenderOption(options);
task.setParameterValue("projectId", "147080");
task.run();
task.close();
</pre>
<br />
The code appears to work in that it does write a PDF. However, the pdf is blank except for the report title and footer.<br />
<br />
Any idea why this is not getting data back? I ran it in my IDE and I can even see the parameter on the task before it gets executed. Hopefully I'm missing something silly.<br />
<br />
I did test this in the viewer and it works fine there.
Find more posts tagged with
Comments
There are no comments yet