cancel
Showing results for 
Search instead for 
Did you mean: 

Rows with all values as zero should be suppressed

Former Member
0 Kudos

Hi all,

We have a requirement in crystal reports to display all the zeros as blank (suppress zeros) and if a row contain all values as zero we have to suppress the entire row.

Please help me in achieving it. Please find the screen shot attached for your reference.

Note: In the screenshot attached, the GL “100002- Petty Cash clearing account” (highlighted in yellow) has all values as zero and hence the row is blank. So the entire row should be suppressed/hidden in the report.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Abdul,

I can't see what section that row is in, however if it's the details section then you can go to the Section Expert > Select the Details Section > Click on the formula button beside Suppress and use this code:

if {Curr_Year} = 0 and {Prev_yr} = 0 and {field3} = 0 and {field4} = 0 then

     True

If this is a group, you can use the same formula with a Not condition in the Group Selection formula or the section expert for the group.

-Abhilash

Former Member
0 Kudos

Thanks Abhilash

Answers (1)

Answers (1)

former_member292966
Active Contributor
0 Kudos

Hi,

In the section expert for your record, you can create a formula for Suppress that will suppress the row when all your fields are 0 like: 

{table.FIELD1} = 0 And

{table.FIELD2} = 0 And

{table.FIELD3} = 0;

When all 3 fields are 0 then the row should suppress. 

Good luck,
Brian

DellSC
Active Contributor
0 Kudos

You could also do something like this:

({table.Field1} + {table.Field2} + {table.Field3}) = 0

However, in either case, if there's a possiblity that any of the fields are NULL rather than 0, you need to either set the null handling to "Default values for null" so that Crystal automatically "sees" the nulls as 0 or you need to explicitly handle the nulls.

-Dell