Skip to Content

How to suppress columns when no data

Hello All,

I am using crystal reports Enterprise Edition. The report needs to display all the 50 columns. When any column does not show any data it should not display. how to do this ?

Please help

A B C D E F G

12 12 0 34 34 34 0

The report should not display C and G column as it does not have data.

Please help how to do this in crystal report.

Thanks

Radhika

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 23 at 08:24 AM

    Hi Radhika,

    Right-click each field on the details section > Format Field > Click the formula button beside "Hide" and use this code:

    Maximum({Column_Name}) = 0

    Use this same formula on the column header as well.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23 at 08:05 PM

    The challenge with this is that the columns will not automatically move to the left to fill in the space where the suppressed columns are. Also, I'm not sure whether the Maximium trick that Abhilash mentions will work with string fields.

    I have done this sort of thing on some smaller reports - the trick is that you have a formula for each column that will check to see how many columns previous to the one you're working on are suppressed and then determine which data it needs to show. With 50 fields, this is going to be very cumbersome to get the formulas correct.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded