Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Conditional formatting with Reporting Services


Conditional formatting with Reporting Services

Author
Message
stacey doran
stacey doran
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 77
any ideas on how to format a cell when the cell in the previous row has a different value.
Fred Stemp
Fred Stemp
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 219
What are you looking to do specifically?

If it's from a cell and you want just that value to change format on another cell in the Expression of the cell you want changed you can reference the other cell by using ReportItems!<cell name>.Value

But to really help, if you could provide an example of what you are trying to do, I maybe able to get you where you want to go Smile

Frederick (Fred) J. Stemp, Jr.
Database Administrator / Database Developer
Dealer Funding, LLC

'...if they take my stapler then I'll set the building on fire...'
stacey doran
stacey doran
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 77
I have a Width column. I need to change the format of the cells in the Width column.

I would like the font to be Dark Blue if the Width value in the cell is different than the Width value in the cell in the previous row.
Fred Stemp
Fred Stemp
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 219
Does the column's property allow it to auto grow? If not how are you setting the width property?

Frederick (Fred) J. Stemp, Jr.
Database Administrator / Database Developer
Dealer Funding, LLC

'...if they take my stapler then I'll set the building on fire...'
stacey doran
stacey doran
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 77
sorry, its confusing. The column value is for Width for a product. Like 12ft or 10ft or 8 ft. I want to change the font color propery of this.
Fred Stemp
Fred Stemp
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 219
No worries Smile We can do this like this:

1. In the properties of the column you want the color chnage to occur, go to Appearance | BackgroundColor and select the drop down <Expression...>. Then you'd do something like this for a Table:

=swithch(isnothing(Fields!Width.Value) = 0, "transparent",
Fields!Width.Value = <your value/threshold>, "green",
Fields!Width.Value = <your value/threshold>, "yellow",
Fields!Width.Value = <your value/threshold>, "red")

You may not need a IsNothing statement but I provided one just in case your dataset does return NULL values. Now the Fields!Width.Value can use other aggregates like <>, <, > , =. You can also Use OR and AND statements if you want to set the condition to look at two different columns. You can also use IIF instead of SWITCH. My preference is SWITCH because nesting IIF statements can get confusing Smile

In a Matrix you should/may need to use an aggregate like SUM, AVG, MIN and so forth before Fields!Width.Value

I hope that is of some help. Smile Let me know if I can help more!

Frederick (Fred) J. Stemp, Jr.
Database Administrator / Database Developer
Dealer Funding, LLC

'...if they take my stapler then I'll set the building on fire...'
sandipan.chanda
sandipan.chanda
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 10
What if I am calculating sum of values in a matrix and then based on the results would like to find out the max or min and not from the main select query itself ? I guess an example scenario will be useful , if Yes please let me know and I'll provide one...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search