Solved

crystal group suppression based on formula

Posted on 2015-02-20
7
104 Views
Last Modified: 2015-05-08
CRV10 - I have a report with one group, LOCATION.  In that group footer I have a formula that calculates turnover percentage.  I already have detail suppressed.   How can I suppress the group if the turnover percentage < 10 percent ?

The formula is:  
if Sum ({@terms}, {@pl and dept and name}) = 0 then 0 else

Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100
0
Comment
Question by:jph826
  • 3
  • 2
7 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40622131
Try this

Click REPORT   -->  SELECTION FORMULA --> GROUP

if Sum ({@terms}, {@pl and dept and name}) = 0 then 
     False
Else
     (Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100) >= 10 

Open in new window

mlmcc
0
 

Author Comment

by:jph826
ID: 40622146
Thank you!  I got the "Division by zero" error with the Truncate portion of the formula hi-lighted.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40622592
if Sum ({@terms}, {@pl and dept and name}) = 0  OR  Sum ({@headcount EndofMth}, {@pl and dept and name})  = 0 then 
     False
Else
     (Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100) >= 10 

Open in new window


mlmcc
0
 

Author Comment

by:jph826
ID: 40642989
Exactly what I needed.  Thank you!
0
 

Author Comment

by:jph826
ID: 40642994
thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now