Home
Analytics
Show footer page in grid only at the last page
Rija
How to display data in Grid on footer page(master page) only at the last page?
I mean ,hide these data for each page then show them at the end of the page!
Thanks a lot for your suggestion
Rija
Find more posts tagged with
Comments
mwilliams
Hi Rija,<br />
<br />
With the way the master page is currently rendered, a second master page must be used and must be tied to a report element that has a distinct page break set before it to be the last page. This makes it very hard for it to be on the last page of a report that consists of only a table because you wouldn't be able to switch master pages within an element. In BIRT 2.6, this may change as new master page capablities will be introduced.<br />
<br />
<a class='bbc_url' href='
http://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/birt/project/plan/birt_project_plan_2_6.xml#themes_and_priorities'>Project
Plan - birt</a><br />
<br />
As for a way around this...if your row heights are fixed, you can do something like in the following devShare example to push the table footer down to the bottom of the page.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/989-extend-table-to-fit-page/#description'>Extend
Table to Fit Page - Designs & Code - BIRT Exchange</a>
Rija
Hi mwilliams,
Thanks first for your reply but i wonder if showing data only at the last page
from master page(on grid) is possible or just harder?
I use BIRT 2.3
**** bless Actuate!
Regards
Rija madagascar
mwilliams
Rija,
Say your report consists of a table that spans 5 pages. You have a master page tied to that table. This master page is only rendered one time and redisplayed each page of this table. Only the autoText values are updated. You can't switch master pages while BIRT is creating the table, so you are stuck with this master page. The second master page you have with the grid will go unused unless you put another report element under the table, manually set a page break before it and attach the second master page to it. The problem with this is that your grid will be on a blank page following the table and this is not what you're wanting.
So, the best way to achieve having a grid at the bottom of your last page would either be to use the footer of your table and push the footer to the bottom as shown in the example above, or you'd have to do something like filter out the last page worth of data from the original table, create a new table with pagebreak before set to always, attach a second master page with a grid in the footer, and then filter the new table to only show the last page worth of data.
Hope this helps.
Rija
Hi Mickael,
You know I've just been familiar with BIRT a half month ago.
How to realise your second suggestion like filter last page worth of data from
the original table? and is the new table which linked to a second master has
the same data as the original table? or what? how can I do it ?
sorry for all stupid questions!
Regards,
Rija
mwilliams
Rija,
A solution like that will really only work perfectly if you have a fixed row height. What you would do is add a computed column to your dataSet with a runningcount aggregation. Also, add another computed column that uses the count aggregation. On your first tables page break tab in the property editor, you need to set a page break interval that will definitely fit on one page. You'll want to test this to optimize it. Then for a filter expression, you'll need to do something like row["runningcount"] less than (expression using total count and page break interval to determine value that will not be on last page}. In your second table, on the page break tab, you'd make the page break before, "always". Then for the filter expression for the table, you'd do the exact opposite of the first table. Hope this helps. Let me know.
Rija
Mickael,
After I followed your advice, I met these following problems:
-Should i put above or below the second table?
-Does the second table have the same data as the original?
After the filtration, i got 6 pages instead of 3 in output because there are 3 unused blank
pages that are normally hided, so what should i do to hide these blank pages to
get 3 pages as they are expected in output?
I have an other idea but it doesn't work for the moment.
I use a global variable to show the footer page only on the last page.
- First, I initialize that variable in the script BeforeFactory like this :
reportContext.setGlobalVariable("hideFirst", true);
- Then I use row["runningcount"] and the row["count"] (as you said in your reply) for testing that, if the data belongs
to the last page,
I use the script onRender of the Table Detail to set the value of the global variable :
reportContext.setGlobalVariable("hideFirst", false);
- And last, I change the visibility of the grid on the footer page according to the value of the global variable "hidefirst".
So I check the visibility property of the grid and then I put the 'reportContext.getGlobalVariable("hideFirst");'
in the field Expression of that property.
The problem is that the value of "hideFirst" is always true. So what can I do to change its value by false or where can I put
the instruction reportContext.setGlobalVariable("hideFirst", false); ?
Thank you again for your reply !
Rija, Solofo
mwilliams
Rija,
Here's an example showing how to use the 2 table approach. Let me know if you have questions. This report was designed in 2.3.1.
Rija
Hi Mickael,
My colleague and I thank you so much for your help, because we get
now of what we wanted for few weeks ago.The next deal is
How can we get in output the data per 'Provider name', I mean
the header is very different from all pages? like:
page1: in header: AAAAAAAAA
page2: in header: BBBBBBBBBB
........
Regards,
Rija
mwilliams
Rija,
You should be able to add a grouping to your table on "provider name" and in the group editor, set the page break after to "always except last". Then, you can use the group header to display the different info at the top of each page. Hope this helps.
kkan
Hi William,
I have another BIRT 2.6.2 issue to pick you brains about.. i've looked at the example you have given for
http://www.birt-exchange.org/org/devshare/designing-birt-reports/989-extend-table-to-fit-page/
again I tried to replicate this in my scenario but I get a page break on each row..Where am i going wrong... ?
Thanks
mwilliams
Are you just trying to push the footer to the bottom of the page on the last page of your report? If so and if you have fixed rows, you could just add enough footer rows to push it to the bottom. You'd hide/show the extra footer rows to make sure you use the correct amount of the extra rows. If you don't have fixed rows, there will be a lot more work.
In the example you posted, you put the table extending text box in the detail row. By doing this, you extend the table to fit the page after each detail row, so you'd only have 1 row per page. To get it to work to extend the page to the end on the last page, you'd just need to add an extra footer row and add it to that row instead.
Hope this helps.
kkan
ohhh I see - I see the mistake of assuming to put that text box in detail as opposed to FOOTER!! ah man thanks for that!!
vensw
Hi Guru,<br />
<br />
Could you please give the solution for "Forcing the table footer at the bottom of the page" with a simple table( 1 Header, 1 Detail Row, 1 Footer) in BIRT 2.3.2. I'm not familiar with Lists as I'm a newbie. Also, could you please explain me what steps you have followed? (Which script you have applied for which Report Item and what else needs to be done?). Thank you for your timely help and patience.<br />
<br />
Regards,<br />
EVS.<br />
<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="60155" data-time="1265753142" data-date="09 February 2010 - 03:05 PM"><p>
Hi Rija,<br />
<br />
<br />
With the way the master page is currently rendered, a second master page must be used and must be tied to a report element that has a distinct page break set before it to be the last page. This makes it very hard for it to be on the last page of a report that consists of only a table because you wouldn't be able to switch master pages within an element. In BIRT 2.6, this may change as new master page capablities will be introduced.<br />
<br />
<br />
<a class='bbc_url' href='
http://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/birt/project/plan/birt_project_plan_2_6.xml#themes_and_priorities'>Project
Plan - birt</a><br />
<br />
<br />
As for a way around this...if your row heights are fixed, you can do something like in the following devShare example to push the table footer down to the bottom of the page.<br />
<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/989-extend-table-to-fit-page/#description'>Extend
Table to Fit Page - Designs & Code - BIRT Exchange</a><br /></p></blockquote>
mwilliams
Have you looked at the devShare post or the examples in this thread that show how to extend the table with the HTML text box? Also, there's the option of adding enough footer rows to fill your page and then hiding/showing how many you need to fill your page. Let me know after you've looked at the example if you have questions. I've also posted an example in the devShare about the extrafooter lines as well.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1355-extending-a-table-to-a-certain-number-of-rows-with-alternating-row-color/