Jump to content
Changes to the Jaspersoft community edition download ×

Band size with subreports

Recommended Posts

By: Nathan W. Phelps - nphelps

Band size with subreports

2002-10-03 13:49

I have a band, which includes a subreport, since I don't know how many rows the subreport/detail section is going to return. Is there any way to overcome this issue?



By: Teodor Danciu - teodord

RE: Band size with subreports

2002-10-15 14:56




You could make a trick to find out how many

records were on the subreport.

In the summary section of your subreport, put

an invisible text field or something that in its

expression will make a call to a method of

a certain custom class, that will store the final

value of the REPORT_COUNT variable.


The main report will then read it from there.


This custom class that I meantioned could be the

scriptlet class and you have easy access to the

scriptlet object created on the fly like you can see

done on the last page of the "scriptlet" samples.


You can see similar tricks performed with invisible

lines in the tableofcontents sample that comes

with the 0.4.2 version. There we use the

printWhenExpression of some invisible lines just

to make callbacks on the scriptlet object.


I hope this helps.


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