ReportEngine genreport Run and Render Causes Extra Blank Pages
<p><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;">I'm hoping this is not a bug and is instead a mistake that I'm making that someone can help me resolve.</span></span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;">My environment:</span></span></p>
<ul><li><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;">Windows 7 Enterprise, SP1</span></span></li>
<li><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;">Birt 422 (birt-runtime-4_2_2</span></span>
<p><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;"> (Eclipse Juno build 20130225-0426, although not related to issue)</span></span></p>
</li>
<li>
<p><span style="font-family:Arial, sans-serif;font-size:10.5pt;">Upgrading from 2.5.2, where report works as expected</span></p>
</li>
</ul><p> </p>
<p>My issue:</p>
<ul><li><span style="font-size:10.5pt;font-family:Arial, sans-serif;">When running genreport.bat (or .sh on AIX), using the -m run AND render mode (two step), generating a PDF file, I am getting extra blank page(s) on the PDF that is being caused by a label at the bottom of the report design where the label's text is a long string (set in onCreate) BUT the label's visibility is set to hide it from PDF</span></li>
</ul><p> </p>
<p>What I've tested/experienced:</p>
<ul><li>Issue does not occur when using the runrender mode (single step)<br>
We produce multiple output types from a single rptdesign so for performance reasons, using multiple runrender is not feasible</li>
<li>Issue does not occur when using "view report as PDF" in Eclipse (tested there just to be sure)</li>
<li>Issue does not occur if the label's text is reduced/shortened so that it does not span a "page"</li>
<li>Number of extra pages seems to correspond with the amount of "data" that is associated with the label</li>
<li>Issue does not occur if the label's visibility is set to hide for all outputs</li>
<li>Issue does not occur if I put the label between two tables that have data</li>
<li>Issue DOES occur if I put another element (label, text, dyn text) below it regardless if it has data or not or how it's visibility is set</li>
<li>Tried changing the label's this.text dynamically within it's onRender script, but no luck</li>
<li>Tried dropping the label from within the beforeRender script, but no luck</li>
<li>Changing the label to text or dynamic text produced the same results</li>
</ul><p> </p>
<p>How you can recreate:</p>
<ul><li>I've attached a sample report design and a copy of the genreport.bat that I'm using</li>
<li>There is no data source, no data set, no parameters, no masterpage, just a simple design with two grids (full visibility) containing labels and the label (hidden for PDF)</li>
<li>Download and unzip birt-runtime-4_2_2.zip (eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-4_2_2-201302161152/birt-runtime-4_2_2.zip)</li>
<li>Execute using
<ul><li>genreport -m run blank_page_genreport.rptdesign</li>
<li>genreport -m render -f PDF -o c:\temp\blank_page_genreport.pdf blank_page_genreport.rptdocument</li>
</ul></li>
<li>In the onCreate for the label with text "Grid label 1 - text set in onCreate script", remove the last occurrence of strData, which shortens the data to fit on a "page", thus generating no blank page. Expanding the data will produce more blank pages.</li>
<li>Alternatively, setting the label's visibility to hidden for all outputs will produce no blank page(s)</li>
</ul><div> </div>
<p><span style="font-family:arial, sans-serif;"><span style="font-size:10.5pt;">Any assistance that can be provided will be GREATLY appreciated. Thanks in advance.</span></span></p>