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)
Reset Page Number
cliffcarr
Hi,
I have a report with a group (attached). I would like to display the group header on every page except the first page and the page when the group changes. I also need the page numbers reset to 1 everytime the group switches. The data in my detail has one field that is a lot of text and could potentially take up many pages.
Eg:
first page - only group data (no header) (page number 1 of 5)
second page - group data + group header (continue until group switches)
..
..
group data switch
..
first page - only group data (page number 1 of 7)
second page - group data + group header (continue until group switches)
..
I looked at the pagehandler(and is the only place I could actually get individual page numbers), but I cannot find a way to reset it back to 1. I cannot use any of the other solutions on th site(using custom group numbers) because I do not know how many pages the detail data will span.
Any help is appreciated.
Find more posts tagged with
Comments
mwilliams
Hi cliffcarr,<br />
<br />
This post from the devShare may help with the group page number aspect. You won't be able to reset the page number for each group, I don't believe, but you can use this workaround to create your own.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/491-page-numbers-in-report-layout-/#description'>Page
numbers in report layout. - Designs & Code - BIRT Exchange</a><br />
<br />
The group page number could be requested as an enhancement for future versions of BIRT. You can do that here:<br />
<br />
<a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a>
cliffcarr
Hi Michael,
Thanks for your reply. I did look at these reports before posting but I don't think it will work in this case (I am a BIRT newbie so I could be wrong).
In my report if I add a page variable, the page variable gets incremented every time the group changes but I need it incremented everytime there is a page break (and since this is not rows of tabular data the interval setting might also not work). If you look at my attached design, the page break occurs only because the data in the summary field exceeds a page and I could not find an easy way to trap this occurence and increment the page number (if I add a pagehandler I can correctly trap each page break occurence via java, but I am not sure if anything can be done using the DE or RE api).
Essentially I just need to hide a field (in the group header) at the beginning of the report(first page) and any subsequent group changes(first page that occurs when the group changes). Also I would need to reset the page number(or custom page variable here) and contine to display "Page 1 of 5", "Page 1 of 7", etc. depending on how many pages the summary field spans - Is this possible?
I am using Eclipse BIRT Designer Version 2.5.1.v20090903 Build <2.5.1.v20090922-0630> and the runtime that comes with the same.
Thank you for your time.
Cliff
mwilliams
Cliff,
I will take a look at your design and see if I can help.
mwilliams
Cliff,
Can you set up a similar example using the sample database so that I can test on it? Thanks!
cliffcarr
Hi Michael,
Attached is the report using the test database. I want the group header to not display on Page 1, Page 3 and Page 6 (whenever group changes). I also want the footer on Page 1 to be Page 1 of 2, the footer on Page 3 to be Page 1 of 3 (the actual count of the number of pages within the group).
Is this possible?
Thanks again.
Cliff
mwilliams
Cliff,
So, the bulk of your lines come in a summary section? Not in individual detail rows?
cliffcarr
Yes - the data page breaks only because of the summary field length.
Is there any other way to accomplish this - I am open to any changes.
Thanks again.
mwilliams
If we can find a way to determine how many lines the summary section will go, we can probably figure a page total for a group and do something like in the example above. I'm looking into it already. I'll let you know if I figure out a way to do so.
mwilliams
Cliff,
I've been trying ways to find a good approximation on page numbers. I was able to approximate the amount of characters per line in the summary and add up that value for lines to determine the correct page values for each group. The only problem is displaying this value. The report variable doesn't update til the next group in the master page, so it shows up a group late. This obviously won't work. The only other way I can think of would be to use the same approximations to create substrings out of the summary field and try to incorporate page counts in that way. However, that may not work because you'd have to be pretty exact to get that to line up correctly.
Definitely group page numbering is something that would be a good enhancement for BIRT if you'd like to request it at the link I had posted above.
cliffcarr
Hi Michael,
Thanks for verifying - I will put in a feature request. I think for now the only solution is to print individual pdf's and concatenate them with iText.
Thanks
Cliff
mwilliams
Cliff,
I think you're probably right. If you don't mind putting the enhancement request info in here for future reference, that'd be great! Thanks.
cliffcarr
This feature has been requested at <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=298982'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=298982</a>
; <br />
<br />
Thanks
mwilliams
Thanks for the update, Cliff!
driss03
I try to play on the visibility property of the header of a table to display the header as the number of the current page, but I can not retrieve the current page, and I notice that the variable pageNumber does not incremented
is that any one can offer me a solution?
KavithaD
Hi driss03,
You want to display current page number in header of the table.Correct me if i am wrong.
Thank you,
Kavitha
driss03
Hi Kavitha ,
In my report i have two tables which having a somm header and I want to hide a header of second table in the first page .
Thank your help,
Driss
mwilliams
Hi Driss,
There's an option to not repeat a header after it's shown the first time, but not to show a header the second time and not the first time. This is something you might be able to handle by using multiple tables and filters to limit the first table to the data on the first page so you can delete the header row in that table and on the second table you'd limit the data to show the rest of the data you want to show and include the header row. Not sure there's another way around this.
driss03
Thank you, I bypassed this problem by taking the union query tables and charts to get one like that can make the headers repeated quietly
mwilliams
Excellent! Glad you found something to work for you. Let us know whenever you have questions!