Hello. I have a textbox in which I want to customize the color of the
text. When you go to Properties->Color, the pull-down lets you choose
from a pre-defined list of colors by name (Black, DimGray, Gray, etc.)
You can also enter an expression. What I want to do is customize a
color that is different than the predefined colors. For example: I want
a color that is red 81, blue 81, green 123. The pseudocode for the
Expression would be:
= ColorType(81, 81, 123)
Is there a way to do this in Reporting Services? Thanks in advance.
JustinI did some research for you...
="#ff0000" works, put in the hex RGB values.
="#" & IIF(Fields!Mycolumn.Value < 100, "FF","00") & "00" works
="#" & IIF(Fields!Mycolumn.Value < 100,
Right(CStr(Hex(Fields!Mycolumn.Value))),"00") & "00" Does NOT work
What I didnt try is putting this in a function which returns the string ,
and uses the Field value..
Hope this helpss
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jdyer521@.hotmail.com" wrote:
> Hello. I have a textbox in which I want to customize the color of the
> text. When you go to Properties->Color, the pull-down lets you choose
> from a pre-defined list of colors by name (Black, DimGray, Gray, etc.)
> You can also enter an expression. What I want to do is customize a
> color that is different than the predefined colors. For example: I want
> a color that is red 81, blue 81, green 123. The pseudocode for the
> Expression would be:
> = ColorType(81, 81, 123)
> Is there a way to do this in Reporting Services? Thanks in advance.
> Justin
>|||The last item posted that did not work had some syntax errors, but that is
not why it didn't work ( I was trying to type it in from memory..)
Here is what it should have been... but still doesn't work
="#" & IIF(Fields!EmployeeID.Value < 100,Right("0"
&CStr(Hex(Fields!EmployeeID.Value)),2),"00") & "0000"
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jdyer521@.hotmail.com" wrote:
> Hello. I have a textbox in which I want to customize the color of the
> text. When you go to Properties->Color, the pull-down lets you choose
> from a pre-defined list of colors by name (Black, DimGray, Gray, etc.)
> You can also enter an expression. What I want to do is customize a
> color that is different than the predefined colors. For example: I want
> a color that is red 81, blue 81, green 123. The pseudocode for the
> Expression would be:
> = ColorType(81, 81, 123)
> Is there a way to do this in Reporting Services? Thanks in advance.
> Justin
>|||I hate it when something gets under my skin, as this problem has... I spent
my whole day's support allotment to this one thing... However this code
segment works, even using the input value in the color expression.. add it to
the code place... and refer to it in the color expression...
Function GetColor(Val as Integer) as String
Dim a as String
a = "#"
If (Val < 256) Then
a=a & Right("0"& CStr(Hex(Val)),2) & "0000"
Else
a = a & "00FF00"
End If
RETURN a
End Function
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jdyer521@.hotmail.com" wrote:
> Hello. I have a textbox in which I want to customize the color of the
> text. When you go to Properties->Color, the pull-down lets you choose
> from a pre-defined list of colors by name (Black, DimGray, Gray, etc.)
> You can also enter an expression. What I want to do is customize a
> color that is different than the predefined colors. For example: I want
> a color that is red 81, blue 81, green 123. The pseudocode for the
> Expression would be:
> = ColorType(81, 81, 123)
> Is there a way to do this in Reporting Services? Thanks in advance.
> Justin
>|||Thanks for much for your time, Wayne. That is exactly what I needed.
Justin
No comments:
Post a Comment