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)
Dynamically push elements to page bottom
Max Bo
<p>Hi,</p><p> </p><p>I want to create a report as PDF, where a grid element on the last page of the report is always pushed at the bottom of the page above the footer.</p><p>Is this somehow possible?</p><p> </p><p>Rgds</p><p> </p><p>Max</p>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p><p> </p><p>What kind of object do you have before your final grid ?</p>
Max Bo
<p>A table element.</p>
GLO_FR
<p>Ok, good.</p><p>One easy way to do it is to add blank rows in your table, so you can push the grid, which is below, to the good place.</p><p>Here is a short example and it works like this :</p><p>My bottom element is 10 lines height and I can put 40 lines in a page</p><p> </p><p>So if I have </p><ul class='bbc'><li>30 rows in my data set, it is OK : 30 lines in the page + 10 lines for my footer</li><li>40 rows : I will have a page break so I need to add 30 blank lines : 1 page with 40 lines, one page with 30 lines + footer</li><li>50 rows, 1 page with 40 lines, 1 page with 10 lines, 20 blank lines + footer</li><li>75 rows, 1 page with 40 lines, 1 page with 35 lines + 5 blank lines, 1 page with 35 lines + footer</li><li>etc..</li></ul><p>In fact it's just a modulo 40 and the reminder to manage. For this, I'm using a scripted dataSet and do everything in the "open" and "fetch" event</p><p>There is certainly other solutions, but this is one easy way to do it.</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/pushing-down-an-element-to-page-bottom-r1640'>http://developer.actuate.com/community/devshare/...</a></p>
;
Max Bo
<p>Thanks, that looks really good in your report. But for some reason I am not able to add the open and fetch scripts to my dataset. Only beforeOpen, afterOpen and onFetch. Am I missing something here?</p>
GLO_FR
<p>Hi,</p><p> </p><p>You have 2 DataSources (and 2 datasets). The first one is your db or your flatfile or whatever and the second one which is a scripted datasource.</p><p> </p><p>On each you will have to create a DatSet</p><p>On the first one, you only need to put your data in a memory array on the onFetch event</p><p>On the second one, you need to initialize some variable on the open event and calculate your rows on the fetch event</p><p> </p><p>Did you create 2 datasources and on each one dataset ?</p>