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 Suppress Group fields

Status
Not open for further replies.

LSQUARE

Technical User
Aug 22, 2003
15
CA

I am a beginner user working with Crystal 10.

In the Section Expert for one of my Group Footers, I wanted to suppress any field which has the sum of the value equalling to zero. I have checked off the Suppress(No drill down) box and inserted the following formula.

formula = Sum ({ARA_ACTIVITY__ACTIVITY.Amount}, {ARA_ACTIVITY__ACTIVITY.Invoice})=0

In most cases, this has worked. However, there are some records which still display the Group Field, even though it totals to zero.

I am not sure if some of my other criteria on the report conflicts with the above Section Expert formula.

Would like some guidance on where to proceed for solutions

Thanks
 
Go to Report->Selection Formulas->Group and place:

Sum ({ARA_ACTIVITY__ACTIVITY.Amount}, {ARA_ACTIVITY__ACTIVITY.Invoice}) <> 0

-k
 
Synapsevampire

Thanks, but I originally placed the above criteria in my report, but did not work. Hence, the reason why I moved onto using the Section Expert to solve my dilemna.

The report displays Unpaid Customer billing records by Salesperson. Not a complicated report.

My record selection is:

{EMPLOYEE.QINACTIVE} = "N" and
{ARM_MASTER__CUSTOMER_TOTALS.Outstanding_Amount} <> 0.00 and
{ARA_ACTIVITY__ACTIVITY.DBID} = "VICTORIA"

My group selection is:

Sum ({ARA_ACTIVITY__ACTIVITY.Amount}, {ARA_ACTIVITY__ACTIVITY.Invoice}) <> 0

The group selection is based on summing the individual billing records ({ARA_ACTIVITY__ACTIVITY.Amount}) The link is based on using the Invoice number as the primary key.

I've already re-built the report twice without success.
 
Try:

round(Sum ({ARA_ACTIVITY__ACTIVITY.Amount}, {ARA_ACTIVITY__ACTIVITY.Invoice})) <> 0

-LB
 
Lbass

I must remember to look at the obvious. It worked!

Thanks!
 
Doesn't seem obvious to me, in fact the solution goes against your posted requirements, you said equals zero, not when rounded = zero.

Glad that it's working for you.

-k
 
I frequently run into rounding errors like this in Crystal. Most of my work is with an accounting database, and nearly all of the numbers are number-type currency values. Quite often, a value that displays as 0.00 is not actually zero, and must be rounded - round (<value>, 2) - in order to evaluate as zero in a conditional. I've gotten into the habit of using this syntax in all of my conditionals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top