2009-06-16 34 views
0

我想要一份報告。報告格式如下:如何在RDLC中比較

Thana Good Removed NotFound 

A  2  3  4 

B  1  0  4 

C  1  4  5 

Total 4  7  13 

我有三個類型GOODRemovedNotFound我的DB數據。格式如下:

A GOOD 
A GOOD 
B NotFound 
C Removed 
B GOOD 

如何比較字符串?而且經過比較,我怎麼才能算出A型號Good是2?

+0

我加入SRSS作爲標籤因爲RDLC爲微軟的ReportViewer,其類似於SRSS的格式。應該讓它更容易得到答案。 – OregonGhost 2009-06-16 08:43:48

回答

1

您可以使用IIF語句中的表達式。

例如:

=Iif(Fields!Good.Value = 1, "GOOD IS 1", "GOOD IS NOT 1") 

=Iif(Fields!Good.Value > Fields!Removed.Value, "Good is larger than removed", "Good is smaller or equal to removed")