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!

Having Problems Suppressing Zero Value 2

Status
Not open for further replies.

kirbytheresa

Programmer
May 25, 2002
12
US
I have a formula that conditionally returns a numeric field or zero. I have the format set to suppress if zero. Sporatically in the report, when the formula returns a zero, it isn't suppressed. I can't see a pattern for when it doesn't suppress.

Has anyone seen and conquered this problem???

Thanks.
 
Please post your formula.

Also, are there ever nulls in your data? Maybe this is getting in the way? Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
It's not a real zero.

It's probably a partial integer that's being rounded to zero because you have the Round option set to 1 or something.

"Suppress if zero" only works with true zero values.

Naith
 
Thanks to both of you. I thought for sure that would be it but it wasn't. None of the fields have any null values and I don't see how anything can get rounded here.

My formula looks like this:

If {LAYERS.POL_TYPE} <> 'T'
then {LAYERS.AGGR_LIMIT}-{@PaidCommit}+{LAYERS.VARIATION}
else 0

In all the places where the zero is not suppressed, the 'then' piece is returning the zero rather than the else. However, there are also many time that the 'then' returns a zero which is suppressed.

When the formula returns a zero, the variation is a negative number but the calculation returns exactly zero (the aggr_limit - paidcommit = absolute value of variation). This is also true in the places where the zero does get suppressed.

hmmmmm......any other ideas??????

Any other ideas????
 
Very interesting that you say the same criteria gets handled differently per scenario. There must be something dictating the deal somewhere. However, you can probably solve this without getting in too deep.

If you don't want to have your numbers rounded, and apparently don't want to have negative values displayed, then if you conditionally suppress on {@Formula} < 1, doesn't that work it for you?

Naith
 
What is the formula for {@PaidCommit} Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
I tried suppressing if the formula is less than zero. This didn't change anything. I think this was because the formula returns exactly zero.

Below are data values for one example:

Paid commit =
{LAYERS.CGL_EXP_COM} = 0.00
+{LAYERS.HPL_EXP_COM} = 0.00
+{LAYERS.CGL_IND_COM} = 0.00
+{LAYERS.HPL_IND_COM} = 0.00
+{LAYERS.CGL_IND_PAID} = 0.00
+{LAYERS.HPL_IND_PAID} = 16,791,542.90
+{LAYERS.CGL_EXP_PAID} = 0.00
+{LAYERS.HPL_EXP_PAID} = 3,028,155.62
+{LAYERS.BASE_VAL} = 0.00
1,999,698.52


Aggr limit 20,000,000.00
-Paid committ 1,999,698.52
+ variation -301.48
= 0.00

Thanks to both of you for your efforts. If you think of anything else please let me know.
 
I see you have partial integers showing up on your report, so maybe < 1 is not such a good plan.

If you customise the number field, can you turn Negative display on, set rounding up to about 5 decimal places, and then illustrate what you have?

If there's no change, and you don't mind someone else looking at the report, post your email up.

Naith
 
Naith, thanks again for your time. I am obviously a Crystal novice. I customized to show decimals up to 5 chars, all pieces have zeros beyond 2 and the total is 0.00000 (no negatives).
 
Just to make absolutely sure use Round (2 decimals should be fine) to make sure there isn't a stray value in a small decimal somewhere.

Computers like storing things in little corners sometimes. Editor and Publisher of Crystal Clear
 
That's exactly what the problem proved to be, ChelseaTech. When Theresa sent me the report, there were microscopic values being retained which were smaller than 0.0000000001 - hence them looking like zero when they actually weren't.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top