Saturday, September 22, 2012 8:55 PM
I have a line chart which will contain a variable number of series depending on the report parameters. Currently it is using the default BrightPalette. The user may opt to include a reference series. I am trying to create an expression so that if the series is a reference series it appears in green or else the color should be automatic.
The expression looks like this: =IIf(Fields!IsReference.Value,"Green", "#00000000")
Unfortunately this does not work, the reference series is in green but the other series are not rendered on the chart. They appear in the legend but are not drawn in the chart area. If I change the expression to =IIf(Fields!IsReference.Value,"Green", "#ff000000") non reference series are rendered as black so I assume the the hex values is being parsed to an argb and since the alpha channel is 0 nothing appears. Since in other context "#00000000" means automatic can you use automatic as part of an expression or is this not allowed?
Sunday, September 23, 2012 10:58 PMModerator
Thanks for your posting. I have tried in my test environment this expression and it is giving me expected result.
Both works for me
Please right click on your graph and go to properties and try to choose color palette as bright Pastel and see if it make any difference
I hope this will help
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
- Proposed As Answer by Shahfaisal Muhammed Sunday, September 23, 2012 11:52 PM
Monday, September 24, 2012 2:31 PM
Doesn't work for me :( My chart is a line chart but switching it to columns still shows the same behaviour.
Played around with using Nothing as well but no joy. The reference series is green all others are black.
=IIf(Fields!IsReference.Value, "Green", Nothing)
I did find a similar post regarding this issue. It concerns a similar expression that used to work in SSRS 2005 but no longer works in SSRS 2008 (the version I am using) so I am guessing this functionality was removed.
Here is an SSRS 2005 article that describes exactly what I want to do. (See the section called "Custom Chart Color Palettes and Legends"). But I can't get it to work in SSRS 2008.
Thanks for you help,
Monday, September 24, 2012 3:02 PM
Give a try to this expression.
=IIf(cbool(Fields!IsReference.Value)=true, "Green", "#00000000")
Monday, January 28, 2013 10:27 PMI got the same error, both "Automatic" and "#00000000" don't work for me, I'm using rdlc report viewer in VS2010