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

Crystal Reports line suppress by formula value 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I have a report that groups by job then department cost. I have a formula in the grouping that calculates the % of the department cost of the total job cost.

I would like to suppress all of the department lines except the one with the largest % of total cost. Is there a way to do this?

Job 123
dept a 10%
dept b 20%
dept c 60%
dept d 10%

I want to suppress all lines on this job except dept c (the highest %)
 
Please post the content of the percent formula.

I am assuming the second group is on dept, not cost.

-LB
 
I have three groups: Customer, Job and Department in that order.

So the total cost of the department / the total cost of the job to create the % of each department cost.


if Sum ({@TotalCost}, {SSRpt_JobCostFinalJobsnrw.JobNo}) = 0 then 0
else Sum ({@TotalCost}, {@DeptName})/Sum ({@TotalCost}, {SSRpt_JobCostFinalJobsnrw.JobNo})
 
What's the content of {@TotalCost}? If you are able to right click on it an insert a sum on it at the department level, do that. Then go to report->sort groups->and select sum of {@TotalCost}->and choose top 1. (Since the top sum will provide the highest percent.)

-LB
 
Thank you so much. I have been struggling with this for a while. You have helped me several times in the past and I really appreciate that you are willing to help so much.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top