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

Leave out one field in crosstab summary

Status
Not open for further replies.

acessn

Programmer
Feb 16, 2005
71
NO
Using CR9.0, Microsoft SQL database.

I've created a report with a crosstab that's lists number of hours for a specified paycode:

I.E. (semicolon seperated for the example)

Employee;Paycode;hours
Mr.X;Overtime;10
Std_hours;15
Sicktime;7
Total:32 hours

Mr.Y;Overtime;15
Std_hours;30
Sicktime;2
Total: 47 hours


What I would like to do is to display all these three pay codes as is, but leave sick time out of the summary, so that totals will be 25 for mr.X and 45 for Mr.Y

Any ideas on how to leave one item out in the summary?

Thanks,

Bjorn


 
I wonder if you are simplifying your crosstab. Based on what you are showing, you don't really need a crosstab--you could just group on employee and then on pay code, add the hours, and then add a formula:

if {table.paycode} <> "sicktime" then {table.hours}

Then insert a summary on this formula. If you need the crosstab, you can still insert this formula as a second summary field, but suppress it in the inner cells, and suppress the total that includes the sicktime. Then adjust the size of the suppressed fields so that they don't create too much unwanted white space.

-LB
 
The cross tab is simplified.

I need to use the cross tab, because we display hours per project(Number of projects vary from month to month).

........ ---------------------------------------
........|Project 1 | Project 2 | Project 3 |
........ ---------------------------------------
Mr.X.... Overtime;10...Overtime;7...Overtime;1
........ Std_hours;15..Std_hours;3.Std_hours;2
........ Sicktime;7....Sicktime;1...Sicktime;0
........ Total:32hrs...Total:8hrs..Total:3hrs

etc...

I will try your formula solution.

Thanks,

Bjorn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top