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!

How to perform conditional sum - Crystal Reports 10

Status
Not open for further replies.

cordelia

Programmer
Apr 2, 2003
21
US
Hi! I need help performing a conditional summary within a group. So far in my searches for help I've not come across an answer or not understood the answers I've seen.

The report first groups by Shop (ie - Construction, Housekeeping, etc) then a secondary group by Category (Planned Repair, Repair, and Preventative Maintenance). Within the second group I display the hours per category.

I need to show the total hours (or sum of) within the first group for the 'Planned Repair' and 'Repair' categories.

I've done an insert summary in Group 1 but that totals the hours for all 3 categories. I've tried creating formulas as well as running totals but must not be doing the logic correctly as I'm not getting the expected results.

Could someone please help me understand what I'm doing incorrectly?
 
I found the solution on this website! :) Here's the link to the solution I found...

In case the link gets stripped out I'm copying the text from the solution and pasting below. Thank you to LBass who provided the solution!!

-----------------------------------------------------
Create a formula and place it in the detail section.

if {WorkCenter.WorkCenterID} = "Motor" then
{Routers.RunTime}

Right click on the formula and insert a sum at the group level. Then drag the result into the group header.
-----------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top