Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to update a column value based on other columns background color? Expand / Collapse
Author
Message
Posted Friday, February 14, 2014 9:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 12:33 PM
Points: 2, Visits: 91
Can someone help out this issue? I am using SSRS 2008 R2

I have a table
col1 col2 ol3 col4
row1 bg color "red" bg color "red"
row2 no color for all three columns
row3 bg color "red"

I want to update col4 = 1 as long as any one of the column at the row has background color = "red". So it means I want to update col4 like:
col4
row1 1
row2 0
row3 1

Thank you.
Post #1541640
Posted Friday, February 14, 2014 11:11 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 1,166, Visits: 1,190
Are you conditionally setting the cells background color? Something like:

=IIF(Fields!Amount.Value < 0, "Red", "Green")

You could use the same type of expression to set the value of your column 4.

HTH,
Rob
Post #1541687
Posted Friday, February 14, 2014 11:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 12:33 PM
Points: 2, Visits: 91
Thank you for your response.

Yes I conditionally setting the cells background color using swich. Since there are more than 70 columns, each column has complicated condition to get background color, I would like use the color result to update this column value.

Another question is hidding property.

I tried to hide a row as long as any columns in this row has background color = "yellow". It doesn't work if using statement as
IIF(fields!col1.backgroundcolor = "Yellow", true, false).

Can you help?

Thanks again.
Post #1541693
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse