Skip to Content
0

How to suppress columns when no data

Apr 20 at 04:05 PM

51

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Abhilash Kumar
Apr 23 at 08:24 AM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you so much.

0
Dell Stinnett-Christy Apr 23 at 08:05 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Christy...

0