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)
IRunTask and IRenderTask vs. IRunAndRenderTask
gdiffor
I currently am running BIRT Report engine in a java web app.
When I use IRunandRenderTask to create a report based on a rptdesign file, I am successful in creating the report.
If however, I use IRunTask to create an IReportDocument and write it to disk for later use, then use the IRenderTask to actually render the report, I only get me headers and the detail is missing from the report.
It's my understanding that the IRunTask does the actual data retrieval that the rptdesign file specifies and the IRenderTask simply renders the report based on the RenderOption object used.
Any ideas why one method works and the other does not?
GD
Find more posts tagged with
Comments
jhelbling
Did you use this example as a starting point :
http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.php#irendertask
Do you by chance get any particular error message and/or exception ? (apart from not having any data displayed)
johnw
The IRunAndRender task just wraps the separate runs of IRunTask and IRenderTasks. My guess is that you are doing something different with the initialization and execution of the IRunTask than what you were doing with the IRunAndRender task.
Yaytay
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="115249" data-time="1363846117" data-date="20 March 2013 - 11:08 PM"><p>
The IRunAndRender task just wraps the separate runs of IRunTask and IRenderTasks. My guess is that you are doing something different with the initialization and execution of the IRunTask than what you were doing with the IRunAndRender task.<br /></p></blockquote>
That's not true - the code for the different tasks is different, the RunAndRenderTask builds the report in a single pass, merging the operations of the RunTask and RenderTask ( a lot of the code is shared, but it is interleaved for RunAndRender).<br />
There are at least two places where this produces different results:<br />
<ul class='bbc'><li>There is a (<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=362245'>reported</a>
, not fixed) bug in the pagination handling for the plain RenderTask - it does not handle page-break pagination correctly.</li><li>Maintaining the total page count for RunAndRenderTasks is a lot more work for emitters - so the SpudSoft Excel emitters get it wrong.</li></ul>
<br />
There may be other differences, but they are the ones that have bitten me so far.<br />
<br />
That said, I use separate RunTasks and RenderTasks all the time and I have never come across an issue that prevents detail data from being displayed, so I concur that the problem in this case is likely that the tasks are being called incorrectly.<br />
<br />
Jim
Yaytay
In case it helps, this is the code I use for running reports in my nut tests:
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/src/d52d4ef43058aa72a3386c1286d82bb908f60272/SpudSoft BIRT Excel Emitters Tests/src/uk/co/spudsoft/birt/emitters/excel/tests/ReportRunner.java?at=default
And this is my workaround for the RenderTask bug:
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/src/d52d4ef43058/SpudSoft BIRT Excel Emitters Tests/src/uk/co/spudsoft/birt/emitters/bugfix/FixedRenderTask.java?at=default
Jim