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 / September 2005

Tip: Looking for answers? Try searching our database.

Setting a cell's background colour using a field's value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jennifer - 29 Sep 2005 09:00 GMT
Hi there

I am wanting to dynamically set the background colour of a textbox by
using a colour value passed from the data.

How would i go about this?

thanks,
Jennifer
BALAJI K - 29 Sep 2005 12:30 GMT
Hi Jennifer,

In the Backgroud property of the textbox set this property
= Fields!iColorValue.Value

Thanks
Balaji

>Hi there
>
[quoted text clipped - 5 lines]
>thanks,
>Jennifer
Jennifer - 29 Sep 2005 17:49 GMT
Thanks very much - i get this error when trying that:

The background color expression for the textbox 'colour' refers to
the field 'iColorValue'.  Report item expressions can only refer to
fields within the current data set scope or, if inside an aggregate,
the specified data set scope.

'colour' is the name of my field being passed in (which contains the
value "red").

Any suggestions?
thanks in advance...
alison - 29 Sep 2005 22:58 GMT
Hey Jen,
Try this.
In the textbox properties for background color use the expression =Me.Value

It worked for me with a textbox I simply typed Red in. When I previewed it
came up red.

> Thanks very much - i get this error when trying that:
>
[quoted text clipped - 8 lines]
> Any suggestions?
> thanks in advance...
Jennifer - 30 Sep 2005 08:40 GMT
thanks Alison.

this is the error is get when trying that:

The background color expression for the table 'table1' contains an
error: [BC30456] 'value' is not a member of
'ReportExprHostImpl.EH_table1'.

Perhaps i am being totally stupid here, but please bear with me...

thanks,
Jenn
alison - 30 Sep 2005 15:48 GMT
Are you trying to set the color for the whole table? Or a textbox.
Your error message looks like it applies to table1. You should only be able
to use this method for a single textbox, as a table contains many values.

> thanks Alison.
>
[quoted text clipped - 8 lines]
> thanks,
> Jenn
BALAJI K - 30 Sep 2005 11:09 GMT
Hi Jennifer,

If the field name is color

then your expression should be like that
= Fields!colour.Value

copy this expression and paste it in  Backgroud property of the textbox.
It will work.

Let me know if this doesnt work

Balaji

>Thanks very much - i get this error when trying that:
>
[quoted text clipped - 8 lines]
>Any suggestions?
>thanks in advance...
Jennifer - 30 Sep 2005 12:08 GMT
Hi

I followed your directions completely and this is the resulting error:

The background color expression for the table 'table1' contains an
error: [BC30456] 'value' is not a member of
'ReportExprHostImpl.EH_table1'.

Any other ideas?

thank you!
 
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.