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

Shared Variable in Subreport not Reinitializing

Status
Not open for further replies.

lfl

Programmer
Feb 19, 2002
4
US
I have a report in Crystal 8.0 with 4 subreports (each in its own group footer). I bring totals from these subreports into a 5th group footer via shared variables. The variables are initialized in the group header.

Here's the problem - variables from 3 of the 4 subreports bring back the correct values, but the variables from the 1st subreport fail to re-initialize and hold their first value throughout the report. If I remove the other subreports, this problem does not occur. I've tried re-initializing the varibles in every possible section of the main report and the offending subreport.

Any suggestions?
 
Give us an idea of where the subreports are placed in the report and where the initialization formula is as well

eg. @initialization in main report header
Subrpt1 in Group1b header

that kind of thing....positioning of the subreports is very important
 
@initialization in Group Header (only one group is used)
details suppressed
Subrpt 1 in Group Footer #1 a
Subrpt 2 in Group Footer #1 b
Subtotals from Subrpt 1&2 vars in Group Footer #1 c
Subrpt 3 in Group Footer #1 d
Subrpt 4 in Group Footer #1 e
Subtotals (from subrpt 3&4 vars) in Group Footer #1 f
Grand Totals (from all subrpt vars) in Group Footer #1 g

No, this report layout was not my idea ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top