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

Basic Expression Expand / Collapse
Author
Message
Posted Thursday, March 21, 2013 4:17 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, August 23, 2014 4:05 AM
Points: 112, Visits: 1,480
Hello,

I am using expressions for the first time in SSRS. Eventually i want to design a dashboard.
I am testing an expression at the very basic level.

I have added a text box on a report. I want the report text box to change colours on different inserts into a table.

I have a table with fields: FirstName, LastName, BirthPlace.

If I insert into a table and the BirthPlace is 'London' I want the box to turn RED.
If i insert into a table and the BirthPlace is 'Edinburgh; I want the box to turn BLUE.


So far ive added my textbox to the report. I have clicked F4. On the background colour of ii i have added the expression:


=SWITCH (Fields!BirthPlace.Value = "London", "Red", Fields!BirthPlace.Value = "Edinburgh", "Blue")


The report is set to refresh every 10 secords. I have added both London and Edinbugh to the tables yet i have not seen the colours change.

Am i going wrong anywhere?

Thanks
Post #1433698
Posted Thursday, March 28, 2013 2:20 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 25, 2013 1:07 AM
Points: 7, Visits: 64
please check below link will help you fill up color

http://www.codeproject.com/Articles/195017/SSRS-Series-Part-II-Working-with-Subreports-DrillD#13
Post #1436730
Posted Friday, March 29, 2013 3:41 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, March 17, 2014 11:46 PM
Points: 17, Visits: 30
You can use below expression in the background color property of BIRTHPLACE textbox.

=IIF(Fields!BIRTHPLACE.Value = "LONDON","Red","Blue")

I think it will help you.
Post #1436852
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse