Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Birt Report - HTML output no Pagebreak
MarcB
<p>Hi guys,</p>
<p> </p>
<p>i´m trying to create an report with HTML output. I used a simple Dynamic-Text Item, which is filled with pure HTML. So far so good...</p>
<p> </p>
<p>The PDF output is only ONE loooong page, i miss the pagebreaks after the chosen DIN A4 format.</p>
<p>I try to set Auto-Layout / Fixed Layout / Pagebreak after: always / etc. etc.</p>
<p> </p>
<p>Is there a possibility to force an pagebreak after the size of DIN A4 or a given fixed size?</p>
<p>Maybe via scripting ?!</p>
<p> </p>
<p>Thanks in advance !</p>
Find more posts tagged with
Comments
cbond
<p>Hi MarcB,</p>
<p> </p>
<p>You are using html, with one large html item correct?</p>
<p> </p>
<p>I have had similar issues in a rptdocument, with a separate run an render task; using the BIRT Report Engine. My report would include the long string of html into one big page, assuming the length may extend past a page.</p>
<p> </p>
<p>If you <u>split the item up</u>, possibly place the dynamic text into the detail row and let the report process the<u> smaller chunks. The page breaks with fixed layout will then work</u>.</p>
<p> </p>
<p>If splitting the html is not an option. Try using grids or tables instead, if you need a multipage html.</p>
<p> </p>
<p>www.cullenbond.com</p>
MarcB
<p>Hi Newbie,</p>
<p> </p>
<p>first thanks for your reply
... <span><span>Unfortunately i can´t split the HTML.</span></span></p>
<p><span><span>How should i use the tables or grids with pure HTML?</span></span></p>
<p><span><span>If i need to bind the coloumns with a Birt-Table, this wont work
</span></span></p>
<p> </p>
<p>I create the HTML on Java side and send this HTML-String to the Report. Why is there no posibility to force the pagebreak after the fixed size of my document? My Masterpage is set to 210mm x 297mm and the Type is custom... even if i choose Din A4 or US letter, the PDF Output is still one long page without any pagebreaks. :mellow:</p>
<p> </p>
<p>Am i able to force this via scripting?</p>
<p>for example:</p>
<p> </p>
<p>i count the HTML-Code lines and after every 50 lines i force an pagebreak.</p>
<p>if (countLines = 50)</p>
<p>{</p>
<p> pagebreak();</p>
<p> countLines = 0;</p>
<p>}</p>
<p> </p>
<p>Or maybe i proof the content at "onPrepare-Script" or something, and if my HTML-Content contains an specific tag ("<table>"), the report do a pagebreak.</p>
<p> </p>
<p>var htmlContent = myHTMLString;</p>
<p> </p>
<p>onNewLine()</p>
<p>{</p>
<p> if(htmlContent.contains("<table>")</p>
<p> {</p>
<p> pagebreak();</p>
<p> }</p>
<p>}</p>
<p>this must be happened on each new Line which is read by Birt...by the way... is Birt reading my input, line for line ?! :unsure:</p>