Jump to content
Changes to the Jaspersoft community edition download ×

returning current row count of subreport


Recommended Posts

By: slowfinger - slowfinger

returning current row count of subreport

2006-03-28 21:59

Hi,

 

I have following situation ...

My report output shows a 1 to n relationship for that case it has an subreport which contains another subreport. Now the first subreport should display a line number of the current dataset which was printed by the child subreport.

 

How I can do that ? Any suggestions ?

Thanks in forward.

Rico

 

 

By: Daren O - rckrll106

RE: returning current row count of subreport

2006-03-29 07:10

There is a way in jasper reports to return variables from a subreport and store them into a variable in the main report. It is in the jasper reports guide, section 12.3

 

I have to admit it hasn't worked well for me.

 

I found it easier to create a HashMap in the main report, pass it to the subreport as a subreport parameter. The subreport can store values in the map which you can use in your main. I use this if I want to return totals but you could return the row count as well.

 

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