Records in colors in RDL

无人久伴 提交于 2019-12-08 11:58:49

问题


I facing some problem while creating RDL report. I want on certain condition some records to be shown in red colors in Report.as well as in execl when i export that report in excel. Can any one plz help me to do this..? Iam using Reporting server 2005.


回答1:


To do this you'll generally use a conditional expression in the "Color" property (or the "BackgroundColor" property) of the table cell(s) you want to change.

To change the text colour of a cell based on the value of the field "Price", for example, in the Report Designer, you'd select the cell, click on the "Color" property drop-down in the Properties window, then choose "Expression". Then enter an expression like:

=iif(Fields!Price.Value >= 5000, "Red", "Black")

...where "Red" and "Black" match up with colour names in the list available from the Color property list. That'll turn any price over 5,000 red, and leave the others as black.



来源:https://stackoverflow.com/questions/4657836/records-in-colors-in-rdl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!