Solved

crystal group suppression based on formula

Posted on 2015-02-20
7
110 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
shared number array to be used in subreport 8 35
Sum of multiple formulas 6 28
Parameter Values   Crystal Rep. XI release 2 6 47
Crystal Report: Load report failed 5 29
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

735 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