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

Create Running Totals using report header

Status
Not open for further replies.

alectek

Programmer
Jul 9, 2003
68
US
Hi!
I'using CR10 and SQL server 2000.
Currently, I'm working on Demographic summary report.
I need distinct count of Clients by Gender with some conditions, like age >= 18 and <= 25

I can’t use this condition in record selection because in the same report I’ll count clients with age >= 25 and <= 50
So I’m using Running Total.
Field to summarize: Client ID
Type of Summary: Distinct count
Evaluate: Use formula: ClientAge >18 and <= 25
Reset: On change of Group: ClientGender

Other Running Total I created for Client with age >=25 and <= 50.
I placed those RTotals in Gender Group footer.
Then I created other set of running totals (Totals) with same conditions only they have Reset: Never and placed them in report footer.

And report looks like:
Gender >18 and <= 25 >=25 and <= 50
Male 10 40% 20 66.5%
Female 15 60% 10 33.5%
Total 25 30
Now, here is my problem.
To calculate % of male and female clients I need use Totals from report footer in the group footer. Can I create the Running Totals using report header.
Thanks a lot at advance.
Alec.


Thanks.
Alec.
 
The problem is, the header is calculated before the running totals. You can insert a subreport that would calculate the running totals though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top