Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong answer when passing variable from subreport

Status
Not open for further replies.

albertross

Programmer
Jul 31, 2002
13
0
0
US
I have a report with 3 subreports that is passing variables to main report. The last subreport passes correctly but the other 2 which pass multiple times depending on a group break are always one goup behind; that is the first time it passes zero and the second group total passes the answer of the first group,etc.
I have WhilePrintingRecords;
Shared numberVar Totalprt;
Totalprt := {@alwcbp} in the group footer section below the group footer which contains (@alwcbp) in the supreport and WhilePrintingRecords;
Shared numberVar Totalprt;
Totalprt;
in a footer section below the section with the subreport in it on the main report.
Hope this explains the problem.
 
Put:

WhilePrintingRecords;
Shared numberVar Totalprt;
Totalprt := {@alwcbp}

...in the same report section as {@alwcbp}. Note that you should always show the content of formulas you reference, like {@alwcbp}. The contents might be afffecting your results.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top