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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal sub report shared variable issue

Status
Not open for further replies.

smmt2207

MIS
Feb 27, 2007
36
US
Crystal Reports 2016. I have a main report, with a sub report. All pulling data correctly. However when I try to use a shared number variable the amount is not correct. Group header 1 has the initial sub report (Items with border) and group header 2 contains the "while Printing Records share numbervar ...." but the amount is incorrect. The initial sub report is linked up by an id field. I cannot get the shared field to calculate correctly. Please see the attached. I have tried placing the main formula in every section below the sub report section

Any assistance is greatly appreciated

Margie

Capture_x2dmyl.jpg
 
The formula's look OK, and you said the display formula is in a section below that which contains the sub-report, so the only other possibility I can think of is that there is another formula somewhere that is setting the value before it is returned for display in the body of the main report.

Have a look through all formulas throughout the main report and all sub-reports looking for anywhere the variable may be being set/reset.

Hope this helps.

Cheers, Pete
 
What are you grouping on? Is the subreport linked to the main report on the field you are grouping for Group #1? So you want the total from group #1 to appear unchanged in each Group #2 header?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top