I am trying to create subtotals in a main report from shared variables coming from subreports. The grouping is being done in the main report and I need to display the subtotals from detail records coming from subreports. Can anyone help me with this??
I'm not quite sure I understand. I need to populate the variable, SubShare, with a value coming in from my database, biAmt. I then need to carry this value over into the main report for each detail record and sum it up in the group footer.
I thought that you already had the shared variable working in the subreport, and you were returning the values.
In the subreport add a formula:
whileprintingrecords;
shared numbervar SubShare;
Subshare =: sum(table.field} // or whatever field this is
This value will be passed back to the main, and the formulas there will provide sums of the values passed back.
It's very difficult to guess what someone has in mind from a text description of a problem, if this doesn't help you, please provide an example fo the main and subreport, example data and expected output.
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.