Jump to content

Multiple sub-reports inside a master-report


toffer
Go to solution Solved by mike2tango,

Recommended Posts

Hello everyone,
I would desperately need some help to achieve the following:

  1. Create a master-report.jrxml, which includes a table of content and the corresponding sub-reports
  2. These sub-reports all contain a different chart with different data query, which can be bigger than one page
  3. Every page which includes a sub-report must show some static frame with dynamic content like the current sub-report's name and page X of Y

My approach so far was, to create a sub-report.jrxml for each of my required charts (I put chart in the sub-report's summary band). Then I created a MasterReport.jrxml with my static frame which included the sub-reports in the summary band. I expected/hoped that JasperReport would render a the according sub-report after each other, but it just overdraws on the same page.

How can I configure my report, to display the sub-reports after each other on new pages?

Any help with this, would be highly appreciated.
Thanks!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Hello CT

I need to do the same. I have basically the following process. I make a master report. This report contains some header stuff and some footer stuf. Then I place a subreport in the detail bar. In the master report this element is then set to Location.position type "float" .

Then in the subreport I place all other subreports.

To count the pages I've needed to place the standard page from .. to elements (in the palette) on every page. If it is not on every subreport either the pages following from this subreport are not counted :-( (Maybe there is a better way)

But the magic is to set all your elements to float to get them under each other. You are then the master of how big a page is by controlling the height of each detail part of each subreport, that's what worked for me.

Greetings

Mike

 

 

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...