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

Passing group totals from subreport to main report

Status
Not open for further replies.

KingTechMary

IS-IT--Management
Nov 12, 2001
6
US
Bear with me - I'm new at this.

I'm trying to use a shared variable to pass a group total from a subreport back to the main report. In each report I have the data grouped by year; the main report is from one table and the subreport is from another table, but the years used in each are from the same (a third) table.

The subreport is in the Header of the main report.

In the subreport I have:

Shared numberVar Enrollments:= Count ({KTI_PFND_Workflow.cmp_code}, {@Fiscal Years});

In the main report I have:

Shared numberVar Enrollments;

I can see the correct totals in the subreport, but when I put the formula into the main report I get the same number over and over, which is the last total in the list on the subreport.

My ultimate goal is to chart the yearly values of each against each other.

Hope all of this makes sense! Thanks in advance....
 
Try referencing the count in a formula field, then reference the formula field for your Shared Variable.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
If you can group the main report by fiscal year, you can...

1. place a formula that resets the shared number value at the group header:
Shared numberVar Enrollments := 0;

2. place the subreport in the detail section

3. place the formula to display the passed value at the group footer:
Shared numberVar Enrollments;

Hope this helps,
HS

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top