<p>I have a grid with a row. The visibility of the row is set by an expression:</p><pre class="_prettyXprint _lang-">!dataSetRow["inspection_participants_summary"] </pre><p>"inspection_participants_summary" is a column in one of my Data Sets that evaluates to "true" or "false". I also have a page break for after this row set to "Always". The problem is that when the row gets set to hidden, the page break still happens which causes an empty page to be displayed. I end up having this blank page displayed in the web viewer and the PDF output.</p><p> </p><p>I want to set the report up so that if that row in the grid is set to hidden, then the page break doesn't happen. So I made a script in the onCreate() part for that row:</p><pre class="_prettyXprint _lang-">if (dataSetRow["inspection_participants_summary"] == "true") { this.pageBreakAfter="always";} else { this.pageBreakAfter = "avoid";}</pre><p>However, when I run this, I get this error:</p><p> </p><blockquote class="ipsBlockquote"><p> </p><p> </p> <div><strong class='bbc'>org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "if (dataSetRow["inspection_participants_summary"] == "true") { this.pageBreakAfter="always"; } else { this.pageBreakAfter = "avoid"; }": ReferenceError: "dataSetRow" is not defined. (/report/body/grid[
@id="326"]/row[
@id="328"]/method[
@name="onCreate"]#1)</strong></div> </blockquote><p> </p><p>So how do I make the page break conditional? Is there another way I can get rid of the blank pages?</p><p> </p><p>Thanks!</p>