Jump to content
We've recently updated our Privacy Statement, available here ×

How to crate a dammy group that breaks on each page?


igorns
Go to solution Solved by Tom C,

Recommended Posts

I tried to create dummy group that breaks on each page to be able to have footer with dynamic height on every page but my group brake does not work.

I took idea from teodord here http://community.jaspersoft.com/questions/537929/page-footer-stretching-fields, with group expression $V{PAGE_NUMBER} but no joy. There is only one group, no break on each page at all.

Any idea please?

I use the latest JapserReports 6.0.3

Thank you in advance

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

What Teodor said in the previous community posting is:

1) JR report page footer cannot stretch;

2) JR report group can start at a new page on group breaks;

3) JR report footer can stretch and be placed at the bottom of the page.

To meet your report requirement that needs to have variable height page footers, one approach is to utilize group footer to hold report page footer content with various text lengths. The tricky part, however, is how to trigger the group break. I am not sure how you designed your report using the group that you see no page breaks when group changes. But in general, you should not use report system variable $V{PAGE_NUMBER} for your page break because as Teodor mentioned in his comment, the group break "needs to start sooner/upper on the page", so that your group footer will have enough room to display its content on the current page without overflowing into another page. Once you reach the page break. as indicated by $V{PAGE_NUMBER} increment, it is too late to lay your group footer on the page.

There's no easy way to use group footer to achieve a dynamic report design to meet your requirement. You will need to set up some hard rules to determine how to make the group break, such as number of detail records per page, etc, and test the approach to come up with the best design solution.

Link to comment
Share on other sites

Here is a demo report output using a group break with 10 records per page. Notice the group footer is placed at the bottom of the page with variable length text. The last page is the report summary band containing footer text in its entirety. The group expression used in the report is:

($V{REPORT_COUNT}.intValue()-1)/10[/code]

 

cey6digv4dqucg2b4pmp6ai9src9z7mk.png

vbfr4h4taua716ikz2rqka6js7hx7edu.png

nrpy0xvcq028ng4ggf1w5bj72yvq7c56.png

o694rya11wgsiinhtu4xy62f8llqvu6r.png

wyxfvyovaqa6won7sdgxne11vfp8p9aq.png

5wg3ouzbt6dl9pkagi334td7el8c40rf.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...