Jump to content
JasperReports Library 7.0 is now available ×

Subreports - help using multiple and sizing


Recommended Posts

By: Shawn Garbien - shawngarbien

Subreports - help using multiple and sizing

2003-06-27 06:51

I am having the following issue with subreports. Basically what I have is a MasterReport that is made up of 3 subreports. The MasterReport doesnt actually have any data -- it is just used as a definition for showing the subreports.

 

The three subreports all take in a JRBeanCollectionDataSource as the datasource.

 

My basic problem is this:

 

All I want to do is display the 3 subreports one after another. But, if I tried to put all 3 in the <summary> -- I have no way to know how big each one will be so I dont know how to define the "y" axis. It would be easier if you could have multiple bands for the summary (or the detail).

 

Currently, I have worked around this problem by placing one subreport in the <band> belonging to the <title>, one in the <detail> and one in the <summary>. This is not a very elegant solution.

 

Does anyone have any idea how to do this?

 

I am pretty new to this so I am hoping I am missing something.

 

 

 

 

By: Ryan Johnson - delscovich

RE: Subreports - help using multiple and sizing

2003-06-27 09:44

Maybe try creating a group for each one that only prints once (use a constant groupExpression). put the subreport in the header and make an empty footer:

 

<group name="sub1">

<groupExpression>Boolean.TRUE</groupExpression>

<groupHeader>

<band height="...

<subreport>

...

</subreport>

</band>

</groupHeader>

<groupFooter>

<band/>

<groupFooter>

</group>

 

I'm hoping that bands resize properly if the subreport is bigger than expected, since I haven't used subreports before.

 

Good luck,

Ryan

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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