I pass a variable(numbervar) from my subreport to the detail of my master report. I then want to subtotal this variable in my master report. But unlike other fields or formulas I can not subtotal on the variable.
I don't understand how this differs, except that you might need to qualify when it's summed:
Place this in the report header and suppress it:
//@initSVsum;
whileprintingrecords;
global numbervar SVSum :=0
Place this after the shared variable is returned and suppress it:
//@IncrementSVSum
whileprintingrecords;
shared numbervar mysharedvar;
global numbervar SVSum;
If table.value="A" then
SVSum := SVSum+mysharedvar
//@DisplaySVSum
whileprintingrecords;
global numbervar SVSum;
SVSum
Same rules apply, it just gets incremented when your logic is met.
i am guessing it is not possible for this to work when you are resetting your variable to 0 in the groupfooter each time; is there another way to subtotal them in that case?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.