How to change text color to Red , green ,etc in Reporting Serviece [Resolved]

Posted by Patnaik.Jyoti under Sql Server on 3/22/2012 | Points: 10 | Views : 1190 | Status : [Member] | Replies : 11
I have a tabular report where i need to change color of price on different conditions.




Responses

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 50

Up
0
Down

Resolved
Hi,
It is something like
=iif(condition,value for true,value for false)
=iif(Fields!CasesRegistered.Value<10,"Red","Green")

Thanks,
Sanjay

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 50

Up
0
Down

Resolved
Hi,
Then you can use nested if condition :
=iif(Fields!CasesRegistered.Value<10,"Red",iif(Fields!CasesRegistered.Value>10 and iif(Fields!CasesRegistered.Value<50),"orange","Red") )


Thanks,
Sanjay

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/22/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
Are you using SSRs Client Report or Server Report?

Thanks,
Sanjay

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Creating a Server side Report

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
If you are using a Textbox , Select this.
If using a Table then select the cell.
Then go to color properties, at the end you can see one option i.e Expression
There you can mentioned conditional Color:
=switch(Fields!CasesRegistered.Value<10,"Red"
,Fields!CasesRegistered.Value>10,"Green")

I got the sollution

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
ok good,
You could have also used =iif(......)



Thanks,
Sanjay

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi ,
How will be the syntax for it?

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Thanks,
Its also working,But if i have multiple colors?
I mean to say if i want to use more than two conditions?

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Thanks,
Its also working,But if i have multiple colors?
I mean to say if i want to use more than two conditions?

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Thanks
Let me try this also

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
if it solves your problem,mar it as answer.

Thanks,
Sanjay

Patnaik.Jyoti, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response