Thursday, March 29, 2012
dynamic row formatting based on dataset field values
PROBLEM. Would like to change row color based on a calculated field.
I.E. need the row to highlight when an expiration date is within 14 days of
expiring.
I can use the row expression panel to alternate row color, but cant quite
find the magic to make it happen with data as the driver. I can also use the
report code panel which can be accessed with an =Code.bgcolor in the row
background settings.
(sample http://sqlservercentral.com/cs/blogs/aaron_myers/default.aspx)
But yet the report code requires objects references and I can find no
information how this is done in reporting services.
While I am here: What is the process sequence at run time? Does the
report, Table and row formatting have a view of the fields in a defined
dataset?
Thanks in advance.From Properties/BackgroundColor, select Expression.
If you are using a field as the driver, cope and paste the following code
and make sure to change YourFieldName with the actual name.
=IIf(Fields!YourFieldName.Value < 14, "Red", "White")
If you are using a parameter field as the driver, use this instead.
=IIf(Parameters!YourParameterName.Value < 14, "Red", "White")
"MKTapps" wrote:
> HI y'all.
> PROBLEM. Would like to change row color based on a calculated field.
> I.E. need the row to highlight when an expiration date is within 14 days of
> expiring.
> I can use the row expression panel to alternate row color, but cant quite
> find the magic to make it happen with data as the driver. I can also use the
> report code panel which can be accessed with an =Code.bgcolor in the row
> background settings.
> (sample http://sqlservercentral.com/cs/blogs/aaron_myers/default.aspx)
> But yet the report code requires objects references and I can find no
> information how this is done in reporting services.
> While I am here: What is the process sequence at run time? Does the
> report, Table and row formatting have a view of the fields in a defined
> dataset?
> Thanks in advance.
Friday, March 9, 2012
dynamic field for backgroundcolor
background color is stored in a dataset?
I have been trying this on the background color properties:
=Fields.LineColor.Value
Values on that dataset include standard colors like:
-DimGray
-Gray
-White
so on
I also tried using Hex or integers but to no avail.
I need this because I have set of rows where color is attached. The
list is dynamic and cannot be hard-coded in the report.Shouldn't that be:
=Fields!LineColor.Value
vice
=Fields.LineColor.Value
John Grant
=""" & Fields!
"rGenius" wrote:
> How can i change the background color of a textbox in RS where the
> background color is stored in a dataset?
> I have been trying this on the background color properties:
> =Fields.LineColor.Value
> Values on that dataset include standard colors like:
> -DimGray
> -Gray
> -White
> so on
> I also tried using Hex or integers but to no avail.
> I need this because I have set of rows where color is attached. The
> list is dynamic and cannot be hard-coded in the report.
>|||typo error
yes it is =Fields!LineColor.Value
Friday, February 17, 2012
Dynamic chart labels (changing the colors on the fly)
I have a chart that presently has two groupings on the x-axis: Year & Qtr. I'd like the Year labels to be one color, and the Qtr labels to be a different color. (All year labels should be Black, all Qtr labels should be Blue). I can see that an expression can be written to handle this dynamically, but I'm banging my head trying to figure it out...
Any help?
Thanks in advance,
Pete
1. Right click the field and select properties.
2. Click the point labels tab.
3. Click the label style button.
4. In the color expression, enter something like this:
=IIf(Fields!Year.Value = 1900, "Black", "Black")
Do the same for the Qtr field.
=IIf(Fields!Qtr.Value = " ", "Blue", "Blue")
The expressions may not be 100% accurate, but if you play around with this, you should get what you want.
Dynamic chart labels (changing the colors on the fly)
I have a chart that presently has two groupings on the x-axis: Year & Qtr. I'd like the Year labels to be one color, and the Qtr labels to be a different color. (All year labels should be Black, all Qtr labels should be Blue). I can see that an expression can be written to handle this dynamically, but I'm banging my head trying to figure it out...
Any help?
Thanks in advance,
Pete
1. Right click the field and select properties.
2. Click the point labels tab.
3. Click the label style button.
4. In the color expression, enter something like this:
=IIf(Fields!Year.Value = 1900, "Black", "Black")
Do the same for the Qtr field.
=IIf(Fields!Qtr.Value = " ", "Blue", "Blue")
The expressions may not be 100% accurate, but if you play around with this, you should get what you want.
Dynamic background color when using Jump To
destination report when using Jump To. I have a report that users click a
value and it jumps to another report. Whatever value the user clicks on in
the source report I would like to highlight in the destination report so they
can easily view all of the detail records.Define another parameter in the inside report. Then use the parameter to set
the row background color...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Shoeman" <Shoeman@.discussions.microsoft.com> wrote in message
news:7B5B3CCE-1519-48B9-BBE9-932509D431A8@.microsoft.com...
> Is it possible to dynamicly change the background color of the row(s) in
> the
> destination report when using Jump To. I have a report that users click a
> value and it jumps to another report. Whatever value the user clicks on
> in
> the source report I would like to highlight in the destination report so
> they
> can easily view all of the detail records.|||I actually have 1 report with 5 tables. How would I assign the value of the
item clicked to the parameter I created. I have created an expression for
the BackroundColor that I think will work if I could find a way to pass it
the value of the parameter.
=iif(Fields!MENU_NAME.Value = Parameters!Parameter2.Value, "Transparent",
"Blue")
"Wayne Snyder" wrote:
> Define another parameter in the inside report. Then use the parameter to set
> the row background color...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Shoeman" <Shoeman@.discussions.microsoft.com> wrote in message
> news:7B5B3CCE-1519-48B9-BBE9-932509D431A8@.microsoft.com...
> > Is it possible to dynamicly change the background color of the row(s) in
> > the
> > destination report when using Jump To. I have a report that users click a
> > value and it jumps to another report. Whatever value the user clicks on
> > in
> > the source report I would like to highlight in the destination report so
> > they
> > can easily view all of the detail records.
>
>