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

Variable calculation giving wrong value in MainReport when passing it from SubReport to MainReport


dasarishivasagar

Recommended Posts

Hello, I am passing calculated variables from SubReport to MainReport
i am getting result in MainReport but my issue is
I am not getting exact value in my MainReport as like what my subreport calculated variable value is giving. it is giving -1th iterated value to main report.
for example:
i am calculating sum($F{Sal}) which need to sum 8 records of $F{Sal} in my subreport and i need to pass it to mainreport
in my subreport that variable value i am getting sum($F{Sal}) for 8 iterations which is correct and expected
same variable i passed to my mainReport
but in my MainReport it's value printing sum($F{Sal}) for 7 iterations which is wrong, it is skipping 1 iteration i am not getting why it is happening
Please help me on this issue as soon as possible.
Thanks in advance,
Regards,
Shiva.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi Shiva

If you do get a solution to this please post it. Pretty please with cheese and sprinkles on top! http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/regular_smile.gif

I have ended up making stored procedures in the DB to get some of it to work the way I need.

See here:  http://community.jaspersoft.com/questions/847310/row-totals-sub-report-variable

In one case I have a second detail band that calls a sub-report to add two numbers togther and return the answer.

But if you find a better way to do this without a whole sub-report I would love to know.

regards

Peter

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