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

Passing a count summary from a subreport

Status
Not open for further replies.

ChrissyK

IS-IT--Management
Dec 2, 2003
3
US
I am trying to pass a count of employees from a subreport into main report by using a shared variable and it gives me a zero count...

This is what I have in the subreport for a formula
Whileprintingrecords;
Shared NumberVar ActivesCount := Count ({TABLE.person}, {TABLE.company});

This is what I have in the main report
Whileprintingrecords;
Shared NumberVar ActivesCount

The subreport shows the correct number of employees but the main report shows 0. From there I want to use the count to calculate a turnover percentage and it wont let me divide by 0.

Am I doing something wrong?
Thanks




 
Make sure that the shared variable is placed somewhere on the subreport canvas. Also, the shared variable in the main report should be placed in a section below where the subreport runs. If you are still unable to resolve this, you should describe the report layout, where the subreport is, and how it is linked to the main report.

-LB
 
The subreport is in the report footer of the main report and so is the shared variable that I created. The subreport is linked by company and the shared variable is in the group footer of the subreport.
 
I figued out my problem...it looks like I needed the subreports in the group footer of the main report.
Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top