0

I am trying to fetch message A when the currency chosen is AUD or CAD and message B if any other currency is chosen, below is what I am trying but not working. 如果我输入澳元,下面总是显示 MessageB,请帮助:

=IIf(First(Fields!FromCurrencyCode.Value ,"CageDBDataset_spRptVoucherCurrencyExchange") ="AUD", "messageA", IIf(First(Fields!FromCurrencyCode.Value ,"CageDBDataset_spRptVoucherCurrencyExchange") = "CAD" ,"messageA","messageB"))
4

1 回答 1

2

You are looking up the value of the first row of the dataset rather than the current row. So if the first row isn't AUD or CAD then you will always get messageB for every row.

Assuming the tablix's dataset is CageDBDataset_spRptVoucherCurrencyExchange then the expression you want to use is:

=IIf(Fields!FromCurrencyCode.Value = "AUD" OR Fields!FromCurrencyCode.Value  = "CAD", "messageA", "messageB")
于 2013-11-01T04:16:12.927 回答