August 20, 2008 at 7:10 am
Hi how can i fill the cell with color with certain value!!
such as i need to create report with value of colum value between 0 and 25 then green. else 26 to 50 yellow. 51to75 then orange and > 75 red!!
how can i perform this task!!
Please help
August 20, 2008 at 7:27 am
In the Background color property of the cell you need to put in an expression like this:
=switch(Fields!FieldName.Value <= 25, "Green", Fields!FieldName.Value > 25 and Fields!FieldName.Value <= 50, "Yellow",
Fields!FieldName.Value > 50 and Fields!FieldName.Value <= 75, "Orange", Fields!FieldName.Value > 75, "Red")
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 20, 2008 at 7:31 am
I'm assuming that you're talking about a textbox (cell) in a Reporting Services report. If that's the case, then you can set the BackgroundColor property to an expression similar to: =IIf(Fields!ColumnName.Value > 25, IIf(Fields!ColumnName.Value > 50, IIf(Fields!ColumnName.Value > 75, "Red", "Orange"), "Yellow"), "Green").
Hope this helps,
Bryan
August 20, 2008 at 5:29 pm
Hi,
It only does green even if the value of fiele is 69.9 which suppose to be different color!!
August 20, 2008 at 5:38 pm
Also can it make the shade color only to the value of field and not whole cell? such if the value is 69.3 then it needs to color that part of cell only?
Please help!!
August 20, 2008 at 5:49 pm
August 20, 2008 at 6:36 pm
The screenshot you attached does not really tell us much. Are each of the rectangles a different cell or textbox?
Check out this article, http://www.sqlservercentral.com/articles/Reporting+Services/Santa+gets+an+RDL+present/61782/, I think it may help you out.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 20, 2008 at 7:09 pm
yeah it is can be one cell but need to know how to fill color for the value of field.
Thanks
August 20, 2008 at 7:25 pm
pat (8/20/2008)
yeah it is can be one cell but need to know how to fill color for the value of field.Thanks
Huh? So it the rectangle one cell or multiple cells?
You have been given examples of how to change the background color of a cell in SSRS. If this does not work, then you need to look for other solutions. The link I included in my last post may give you some ideas.
Maybe if you attached the rdl to the thread so we can see what you are doing we can help even more.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:36 pm
It is one cell only!!
the colors work fine but only thing i want to achieve is i want to fill color only to the value of the field.
for example
fieldname.value = 69% then it needs to fill 69% of cell to fill with color!!
Any help will be appriciated!!
Thanks
Pat
August 21, 2008 at 8:09 pm
In SSRS the background color is either set or not set, so you can't partially fill a cell. You might be able to do something with a chart, which was the idea of the article I mentioned earlier.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 9:39 pm
Gradients and proportional background colors are not available for test boxes in SSRS. You can look here http://blogs.msdn.com/bobmeyers/archive/2005/10/15/481342.aspx for an example of how to use an image inside a table to simulate it, but I doubt that you'll be able to get test to floeat on top of the image. You'll have to play around a little to see if you can make it work. You might also look for third party SSRS add ons that have gradient capablity with table cells.
Hope this helps,
Bryan
Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply