September 7, 2010 at 6:02 pm
Hi All, I am new to SSRS--please help me on following issue
I have following Tablix in SSRS
Portfoliotype Jan Feb
A 1 2
B 3 4
I want to have different font based on my condition on given month
On Jan if portfolio = A then I want red font....
I am using following expression but I am not geyting any result...
=iif(Fields!Portfoliotype.Value="A","red","green")
where am i making mistake?
Thanks
September 7, 2010 at 8:43 pm
This looks okay - as long as you're doing it in the font color property?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 8, 2010 at 8:06 am
Also, be sure you are using it on the appropriate font color property. There's one for the row and one for the individual cells. I don't remember which overrides which when they are both set at the moment, but that may be the issue.
-Luke.
September 8, 2010 at 8:57 am
I want to do in individual cell...but its not working...I am putting expression on font...
Thanks for all your help
September 8, 2010 at 10:58 am
So sorry, I wrote my previous post from memory, instead of checking in my SSRS environment. Instead of the font attribute, you want to use the color (aka foreground color) attribute of the control which contains the text you want to make red. This should be totally separate from the fonts, or at least it was in SSRS 2005 (all I have access to here at the office.)
Right click the cell you want to change, click properties, select the color property and put in your expression. It might help to open it in the expression builder just in case so that if there is a syntax error it will show up with the red squiggly line...
-Luke.
September 9, 2010 at 6:28 am
IIRC the font color is case-sensitive so your expression needs to specify Red and Green, not red and green. HTH
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply