cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Columns on Reports?

Former Member
0 Kudos

Is there a way to conditionally put columns on a report.

Report: Column 1, Column 2, Column 3, Column 4

Report (with different inputs): Column 1, Column 3, Column 4

I can't suppress column 2 because there would be white space where it should be.

Thanks,

Linda

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Linda,

You can insert the two column fields in a text box and format the column conditionally. You can also use u2018Can Growu2019 option if required.

For instance, insert a text box. Add two Columns: Column1 and Column2 in the text box.

Select Column2 >> Right Click>> Go to u201CText Formattingu2026u201D >> In u2018Fontu2019 Tab, write a formula for Color (For instance, if {?Country}=u201DUSAu201D then crWhite) so that when condition is true then color will be change to White.

However, in above scenario, you wonu2019t be able to display Column2 as a separate Column field. It will display with Column 1 in text box.

Regards,

Alpana

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks for all the good ideas!!!!

Former Member
0 Kudos

Linda,

The only way I can think to do it while maintaining you formatting would be to use an IF THEN ELSE formula.

Something like this:

IF conditions are met THEN {Table.Field1}

ELSE IF alternate conditions are met THEN {Table.Field2}

ELSE IF ...

Just leave off the final ELSE, if you want a blank column when all conditions fail.

Jason

Former Member
0 Kudos

Jason,

I am curious. Why would I use this instead of the idea to just have multiple detail lines that have different sets of columns that are suppressed conditionally?

Thanks,

Linda

Former Member
0 Kudos

Linda,

I just didn't read the previous comments too carefully. That option would work just as well and may be easier to implement.

Just because I only think of one way, doesn't mean there isn't more than one way.

Jason

Former Member
0 Kudos

Hi Linda,

I have an Idea like.. In a main report insert two sub reports one with 4 columns and other with 3 columns.

Based on Column2 value suppress the sub report.

Hope this will help you.

Thanks,

Sastry

Former Member
0 Kudos

Here is an idea, ( not tested yet ) . Create two detail sections. One the top ( Detail Section a ) put all 4 column. on the bottom ( Detail Section b) put the three columns. On the suppress formula of the "Detail Section a" write IsNull(Column2) . On the suppress formula of the detail section b write NOT (IsNull(Column2)) . Now this will work , if you have the null value for Column 2 all through out the report . If it is in few records and not in other records then it will be white space ( why do you have to suppress a field which is already null , unless u are specifying a alternate value for the null fields ,then you can write suppress formula for that field).

hope this helps.

Former Member
0 Kudos

Hi Linda

You can conditionally suppress the field that has null values with the below formula

IsNull(fieldname)

However even if a column is suppressed it would acquire some space on the report.

Regards

Sourashree