我的報告有兩個數據集,主數據集和第二個數據集(僅包含一行)。我需要計算主數據集中某個列的多少個值低於從第二個數據集取得的值。我使用的表達式爲:SSRS 2008 - 一個表達式中的兩個數據集
=Count(IIf(Fields!TestValue.Value < First(Fields!NetUnitWeight.Value, "SecondDataSet"), 1, Nothing), "MainDataSet")
& " of " & CountRows("MainDataSet")
,但我得到了以下錯誤:
[rsAggregateofAggregate] The Value expression for the textrun 'Textbox1.Paragraphs[0].TextRuns[0]' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.
我試圖通過把First(Fields!NetUnitWeight.Value, "SecondDataSet")
在報表變量來解決這個問題,但這並沒有工作。我該如何解決它?
你可能想看看LOOKUP函數來完成你想要用FIRST做的事情。創意解決方案雖然,好主意! – Lucky