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!

Grand Totals

Status
Not open for further replies.

SuperTime

Programmer
Dec 21, 2004
183
US
Crystal 9

I have the report with Group1 as the Type and Group2 Employees
CPT Jobs
Mike Smith 2
Joe Nance 6
Total for CPT 8
UPH
Mike Smith 3
Joe Nance 3
Total for UPH 5
Total
Mike Smith 5
Joe Nance 9
Total 13

Is the only option to create a sub report to get the Total for each employee?
 
Insert a crosstab in the report footer that uses employee as the row and jobs as the summary field.

-LB
 
Thats rights... that worked well... I have a couple of more totals other then the job even some running totals. Would I be able to display them left to right instead of one below the other as it does when you add the summurized fields?

Thanks.
 
I'm not sure whether this is available in CR 9.0, but check on the customize style tab in the crosstab expert->summarized fields->horizontal->show labels. I'm also not sure if or how well 9.0 handles running totals in crosstabs.

-LB
 
Yes crosstab expert->summarized fields->horizontal->show labels works in 9.0 as well. But you are right its not handling running totals correctly. :( Well in that case I think I will have to create a subreport.
 
Are you sure you need to use running totals?

-LB
 
I am using running totals for the count of jobs in each status. Like count of jobs in Pending, Cancelled, Completed etc. I am using a formula in the running totals to check for the statusid and display the counts accordingly.
 
Please explain exactly how the running total is set up for one of the statuses.

-LB
 
Lets say pending jobs, the running total field to summarize is JobID, type of summary is distinct count, evaluate using fromula StatusID = 4 which is pending, reset on change of group EmployeeName.
 
You could use the following instead of running totals. First create a formula {@null} by opening a new formula and saving and closing without entering anything. Then create a second formula:

if {table.statusID} = 4 then
{table.JobID} else
{@null} //if job ID is a number, use tonumber({@null})

You can then insert a distinctcount on this formula at the employeename group level. You can also use a distinctcount of this formula in the crosstab instead of the running total. Repeat for the other statuses.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top