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.