RDL 中的颜色记录 [英] Records in colors in RDL

查看:29
本文介绍了RDL 中的颜色记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在创建 RDL 报告时遇到了一些问题.我希望在某些条件下,当我在 excel 中导出该报告时,一些记录在 Report.as 和 execl 中以红色显示.任何人都可以帮助我做到这一点..?我使用的是 Reporting Server 2005.

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.

推荐答案

为此,您通常会在表格单元格的颜色"属性(或背景颜色"属性)中使用条件表达式想改变.

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")

...其中红色"和黑色"与颜色属性列表中可用的列表中的颜色名称相匹配.这将使任何超过 5,000 的价格变为红色,而其他的则为黑色.

...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.

这篇关于RDL 中的颜色记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆