Skip to Content
avatar image
Former Member

Rows with all values as zero should be suppressed

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 23, 2013 at 05:06 PM

    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


    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.


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23, 2013 at 05:03 PM


    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,

    Add comment
    10|10000 characters needed characters exceeded

    • 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.