5

我有一份报告,其中给出了项目的当前状态和项目的先前状态,我想显示两行并突出显示差异。例如:

STATUS    ORDER#   NAME      ADDRESS        QTY       PRICE      TOTAL
new       255      Joe       1 Main St      2          5         10
old       255      Joe       1 Main St      4          5         20  

new       256      Matt      100 Green Ave  5          5         25
old       256      Matt      65 Blue St     5          5         25

因此,对于订单 255,我想突出显示 QTY 和 TOTAL 值,因为它们发生了变化。对于订单 256,我想突出显示 ADDRESS 值。

有谁知道我怎么能做到这一点?

提前致谢!

4

1 回答 1

4

In the textbox properties go to the Fill tab. For fill color enter an expression like this:

=iif(Fields!GroupID.Value=previous(Fields!GroupID.Value) 
and Fields!Spouse.Value<>previous(Fields!Spouse.Value) 
,Parameters!Color.Value,Nothing)

Change "GroupID" to be your Order# and change the "Color.Value" to the highlight color you want. Note: This will only highlight the second row when it is different from the first, there is no way to highlight the first row as well because there is no "Next" function, just the Previous function. You can use this to either highlight just the cells that are different or the entire row.

于 2013-05-17T15:49:52.270 回答