开发者

Create a table with a color background in SSRS

开发者 https://www.devze.com 2023-03-21 02:05 出处:网络
I need to modify a report in SSRS 2008 that displays a v开发者_StackOverflow中文版alue using a table representation as follows.

I need to modify a report in SSRS 2008 that displays a v开发者_StackOverflow中文版alue using a table representation as follows.

Create a table with a color background in SSRS

The accepted value range is 1-7 and the table changes the background color of the cell in the table. I need to be able to modify the color of the color according to some parameter. I reviewd the code and the report was done by creating 7 images -- with the different bachgrounds -- and hiding all images but the one that matches the prarameter value.

I was thinking on using an HTML table to achive this, but the I found out SSRS does not support the table tag. Any ideas on this??


You can set up BackgroudColor property of the table cell using expression. In the expression return the proper color code based on your parameter, for instance

=Switch(Parameters!yourParam.Value=1, "Red", Parameters!yourParam.Value=2, "Blue" ...)


I figured it out.

I added 7 Textboxes to the report. I aligned them and set the border values and text to look like the image above. Then, set the color property to something similar to this.

=IIf(Fields!RangeParameter.Value=2,Parameters!ColorParameter.Value,"Transparent") 


=iif(RowNumber(Nothing) Mod 2, "#eefafd", "White")

0

精彩评论

暂无评论...
验证码 换一张
取 消