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

Using return value of a subreport to make calculations


gustavofarias
Go to solution Solved by Tom C,

Recommended Posts

My subreport is winthin the detail band. I store the return value in a variable and print this variable in the same band. This works because I set the Evaluation Time of the element that uses the variable to Band.

This works fine for printing. But I need to acumulate the values returned by the subreport in a variable (let's call it SUM). I've tried every combinations of Reset type / Increment type / Evaluation Time to print SUM in the summary, but it's always zero, the initial value.

I guess the problem is that when SUM evaluates it's expression, the subreport hasn't run yet. For obivious reasons there is no "Band" Increment type for a variable.

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Indeed, this is a timing issue when variable is evaluated before the sub report call. I would suggest either do the calculation in the display field where evelaution time can be controled, or pass and sum the tally inside sub report and return cumulative sum back to the main report.

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