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

How do I display running total summaries in rpt header?

Status
Not open for further replies.

deborahyr

Technical User
Nov 14, 2002
63
US
I'm using Crystal XI and creating a detail list of employees with demographic detail as well as multi-job information over years. I want to be able to show summaries around race and gender so I created running totals, distinctcount ID. I want to display these summaries above the detail. I am not able to use the formulas created in the Report Footer in the Report Header or Page Header areas with the same results. Please help.

Example of what I'm trying to do:
DETAILED DEMO REPORT
%People of Color = 50% %Women = 50% Total Pop = 2
--------------------------------------------------------
ID5, White, Male, Janitor, 2006
ID5, White, Male, Sales, 2007
ID7, Black, Female, Janitor, 2005
ID7, Black, Female, Sales, 2007
 
You can't do this with running totals unless you insert a subreport, but that would not be the best approach. Assuming you have row inflation, you could create formulas like this:

//{@Female}
if {table.gender} = "Female" then
{table.ID} else
{@null} //if the ID is a number, use tonumber({@null})

...where {@null} is a formula that you create by opening and saving a formula without entering anything.

Repeat for each demographic and place these in the detail section. You can then insert summaries on them and drag the results into the report header. For results in the page header, you would have to use formulas like:

distinctcount({@Female})

You could alternatively insert multiple crosstabs in the report header.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top