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)
PDF report: overflow on multiple pages
carloal
<p>Hello,</p>
<p> </p>
<p>we have a report with very long rows that are wider than the page. We would like the report to print all the content of the rows on multiple pages (like excel does), but instead BIRT seems to truncate the content when the max width of the page is reached. We tried to use</p>
<pre class="_prettyXprint _lang-">
options.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
</pre>
<p>but it doesn't seem to work.</p>
<p> </p>
<p>Any idea?</p>
<p> </p>
<p>Thanks</p>
Find more posts tagged with
Comments
micajblock
<p>As far as I know there is no automated way to do this. You might need 2 tables with one visible in HTML and the other visible in PDF where you are breaking it up in to multiple parts.</p>
carloal
<p>Sorry but, I am pretty new to BIRT, I am not following...could you please elaborate a bit more? (it doesn't seems something trivial).</p>
micajblock
<p>The basic issue is that the BIRT PDF emitter will size the page based on the master page size. There is no automatic way to break up the table in to multiple pages like Excel. </p>
<p> </p>
<p>You have two choices. One is to export to Excel and use Excel to print. The other option is more complicated than I initially thought. There might be easier ways but this is what I came up with.</p>
<p>1. Have a regular table (will be used for HTML). In this table have an aggregation for row count.</p>
<p>2. Use the above aggregation in a global variable</p>
<p>3. Create a scripted data source that will have one row per page (in my case I used round up of row count/40)</p>
<p>4. Second table with 2 details rows. One for the left side of the table, the other for the right side of the table. Have a page break after each detail row.</p>
<p>5. Each of the inner tables is filtered based on the page number of the outer table.</p>
<p>6. Set the visibility of the first table to show in HTML and the second one in PDF.</p>
<p> </p>
<p>Attached example.</p>