I'm trying to create a custom template report so that reports inheriting from it will use corporate standards for color and font. I want to create report variables for these, so that the same color can be employed in different parts of the report.
For instance, in the report header properties, I set the RGB values for the BackgroundColor property and, when I save my changes, I see a literal value in the property text box. If I then open the dropdown for the property again, and click the "Expression..." link, I see a numeric literal - in this case, #006a4d, which is a dark green. (I'm somewhat new to SSRS expressions, but apparently expressions that represent numeric constants don't require the "=" sign at the beginning.)
This tells me the constant representing the RGB combination that I want. Now, I go into the Variables tab of the Report Properties dialog and create a variable called "BckndClr" with the same hex constant as its value.
If I then go back to the BackgroundColor property and set it to the expression:
=Variables!BckndClr.Value
and save it, I find that, instead of continuing to to be dark green, the report header's background color in the Design tab has changed to the Auto default (white) color.
If The Visual Studio properties dialog displays a value for a literal color expression, why can't I use that same value in a user-defined variable and set the property expression to that variable?