Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2006

Tip: Looking for answers? Try searching our database.

Dynamically controlling a cell in 2005 SRS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wardellcastles - 30 Jul 2006 15:38 GMT
Is there a way to put code (i.e. an Expression) behind a cell in a
table that will control the background and foreground colors of the
cell itself?

For example (this is pseudocode to indicate what I want to happen)

If =Fields!policy_count.Value > 5 then
 Set background and foreground to "Red"
else
 Set background and foreground to "Green"
endif

Thanks!!
toolman - 31 Jul 2006 14:19 GMT
Couple issues here:
First, to answer your main question, yes you can do this with
expressions but you're going to need to set up two sepearte
expressions; one for each of the cell properties you want to change,
BackgroundColor and Color. Color is the property for font color i.e.
Foreground.
Insert code something like =IIF(Fields!policy_count.Value >
5,"Red","Green") as the Expression for the property in question.  That
should give you the appearance you desire.
Second thing and maybe I'm just reading too much in but you don't want
use the same expression for both properties otherwise you'll end up
with just  all green or all red cells.
HTH
toolman

> Is there a way to put code (i.e. an Expression) behind a cell in a
> table that will control the background and foreground colors of the
[quoted text clipped - 9 lines]
>
> Thanks!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.