April 12, 2012 at 5:55 am
I'm pretty clueless when it comes to VB.net but I'd like to transform the following expression for the conditional coloring of cells in a column into custom code:
=iif(Fields!ServiceTeam.Value IS Nothing,"White",
iif(Fields!Median.Value>Fields!ServiceMedian.Value,"#d81e05","#009e49"))
I'm aware that I need to create a function in the Report Properties-Custom Code and then call the function from the background colour property of the cell, but can anyone help me out please to get me started?
Is there anywhere on the web that can help in converting Report Services expressions to VB?
Many thanks.
April 12, 2012 at 7:12 am
Spend a few minutes searching here on SSC. There are several articles and blogs about using custom or embedded code in SSRS reports. I even recall an article (or article series) on custom color palettes.
April 13, 2012 at 3:23 am
Thanks - I have done, but didn't find anything that would help me specifically. I shall have another look though and let you know how I get on.
April 13, 2012 at 4:11 am
Hi
I can see from a number of articles how conditional color formatting can be done in circumstances other than my own, but not against this part of the the original SSRS expression:
iif(Fields!Median.Value>Fields!ServiceMedian.Value,"#d81e05","#009e49"))
I could build a case statement into the original stored procedure and assign a flag where Median.Value>Fields!ServiceMedian.Value and use that to assign a color by value in custom code, but this is not the way I want to go at this time. i.e. I need the latter comparison to take place WITHIN the custom code. Is there a way to do this?
As I've said, my knowledge of VB is zilch at this time and I'm in a bit of a rush. If I can get a basic hold on how to do this, I can apply it across all sorts of stuff (and do some VB study when I have time).
Thanks to all in advance.
April 13, 2012 at 11:53 am
April 18, 2012 at 5:37 am
Hi
Thanks I'll take a look and report back.
Cheers.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply