0
=iif(Fields!SubjectCode.Value=Parameters!SubjectCode.Value,Fields!SpAbsentCount.Value,0)

我有一个主报告和一个子报告

SubjectCode 参数从主报表传递到子报表

为每个主题代码生成子报告。根据主题代码,我需要选择一个值(SpAbsentCount)以显示在子报告上

类似于 select... from... where SubectCode=@SubjectCode

我尝试了上面的表达式,但它不起作用

4

1 回答 1

0

Hard to say exactly without knowing the data and setup of your report, but one guess I have is that you have a whole set of values, and your IIF expression winds up looking at only the first row of values. Try creating a tablix or list that filters on the SubjectCode, then using your code.

于 2015-02-20T16:05:45.607 回答