COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rahul325 on 30 Oct 2017 02:13:09 PM

Title: Changing the background color of a text box based on the value in a table
Post by: rahul325 on 30 Oct 2017 02:13:09 PM
In the attached image, I want to be able to change the background color of the text box ( Baseline) based on the value in the column "Baseline Finish". How can I do that?
Title: Re: Changing the background color of a text box based on the value in a table
Post by: MFGF on 31 Oct 2017 04:26:15 AM
Quote from: rahul325 on 30 Oct 2017 02:13:09 PM
In the attached image, I want to be able to change the background color of the text box ( Baseline) based on the value in the column "Baseline Finish". How can I do that?

Hi,

In your image there appears to be one text box, but many different values for Baseline Finish. Can you explain your requirement? Which value of Baseline Finish should dictate the colour of the text box? The maximum? Minimum? First? Last? Something else?

The actual process will utilise an advanced conditional style, but the condition will be dictated by the answer you provide to the above question...

Cheers!

MF.
Title: Re: Changing the background color of a text box based on the value in a table
Post by: rahul325 on 31 Oct 2017 09:35:20 AM
Quote from: MFGF on 31 Oct 2017 04:26:15 AM
Hi,

In your image there appears to be one text box, but many different values for Baseline Finish. Can you explain your requirement? Which value of Baseline Finish should dictate the colour of the text box? The maximum? Minimum? First? Last? Something else?


The image is one text box.
I need to be able to change the color of the text box based on All or Nothing, I mean, if all boxes are populated, background color green. If none are populated, background color yellow.


Thanks a lot, appreciate your help :)
Title: Re: Changing the background color of a text box based on the value in a table
Post by: MFGF on 31 Oct 2017 11:17:12 AM
Quote from: rahul325 on 31 Oct 2017 09:35:20 AM

The image is one text box.
I need to be able to change the color of the text box based on All or Nothing, I mean, if all boxes are populated, background color green. If none are populated, background color yellow.


Thanks a lot, appreciate your help :)

What is the requirement if some are populated but not others?

MF.
Title: Re: Changing the background color of a text box based on the value in a table
Post by: rahul325 on 31 Oct 2017 11:34:07 AM
Quote from: MFGF on 31 Oct 2017 11:17:12 AM
What is the requirement if some are populated but not others?

MF.


Leave background as white.
Title: Re: Changing the background color of a text box based on the value in a table
Post by: BigChris on 01 Nov 2017 03:09:14 AM
You don't mention what type of data you're using (relational / dimensional), so I'm going to assume relational. What result do you get in your example if you calculate Minimum([Actual Finish])?
Title: Re: Changing the background color of a text box based on the value in a table
Post by: rahul325 on 01 Nov 2017 10:11:38 AM
Quote from: BigChris on 01 Nov 2017 03:09:14 AM
You don't mention what type of data you're using (relational / dimensional), so I'm going to assume relational. What result do you get in your example if you calculate Minimum([Actual Finish])?

I need to look at the Baseline Finish column. I did a Minimum([Actual Finish]) and got 10/9/17.

The Actual Finish column will NOT have all rows populated, the Baseline Finish column WILL have all rows either populated or NOT. That's why I want to check for All or None on that column.


Thanks for all the help!
Title: Re: Changing the background color of a text box based on the value in a table
Post by: MFGF on 01 Nov 2017 10:16:00 AM
Quote from: rahul325 on 01 Nov 2017 10:11:38 AM
I need to look at the Baseline Finish column. I did a Minimum([Actual Finish]) and got 10/9/17.

The Actual Finish column will NOT have all rows populated, the Baseline Finish column WILL have all rows either populated or NOT. That's why I want to check for All or None on that column.


Thanks for all the help!

I guess the expression will be maximum([Baseline Finish]) is not null
You can then conditionally format your text box based on this being true or false

This assumes you're using a relational package rather than a dimensional package.

MF.