Home
Analytics
Avoid Page break after table if there is no data in table
shahamar
<p>I have a report Design layout that has List and multiple sub tables in detail row of list. For each detail row of list date is filtered in Table and shows data if there is any. Each table needs to come on new page so I have Page Break After set to 'Always'.</p>
<p> </p>
<p> </p>
<p>List</p>
<p> Table1</p>
<p> Table2</p>
<p> Table3</p>
<p> Table4</p>
<p> </p>
<p> </p>
<p>Problem is for any specific row in list if there is no data to be shown on Table2/3/4, I get 3 blank pages. How to avoid page break if there is no data to be shown in table.</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p>
<p> </p>
<p>the easiest way is to use the visibility option. If the table is empty and not displayed, you will not have any pagebreak</p>
<p> </p>
<p>Here a example</p>
<p> </p>
shahamar
<p>Thanks That worked as well. I also tried setting page break Dynamically (through scripting)</p>
<p>So approach taken was</p>
<p>1. Set all page break to Auto</p>
<p>2. On create if Total.count(null,null)=0 change the Page Break After to Always (this.getStyle().pageBreakAfter='Always')</p>