2013-05-03 84 views
3

我有以下字段的數據集:如何在SQL Server Reporting Services中的RunningValue函數中指定組?

Serialnumber, Dateofpayment, Paymentamount, Sourcecode and Campaign. 

我的數據只有兩個類型的廣告活動,BS12和BS13。

我試圖通過Campaign繪製付款金額的總計。在圖表我對Y值以下表達式:

=RunningValue(Fields!PAYMENTAMOUNT.Value, SUM, "Campaign") 

不過,我不斷收到錯誤:

The Y expression for the chart 'Chart1' has a scope parameter that is not valid for RunningValue, RowNumber of Previous. The scope parameter must be set to a string constant that is equal to the name of a containing group within the Tablix 'Chart1'.

我擡頭多個來源,我覺得我做的正確的事情,Campaign顯然是我的Tablix中的一個字段,我已經將它作爲字符串輸入。爲什麼發生錯誤? - 有人能幫我嗎?

+1

什麼是你的問題? – Luv 2013-05-03 05:47:20

+0

顯然,問題是爲什麼會發生錯誤? – JackReacher 2013-05-03 05:55:01

+0

你的圖表中有哪些分組?你有「Campaign」分組嗎? – Jeroen 2013-05-03 06:10:10

回答

3

這是抱怨範圍參數:「廣告系列」。您不需要將列名稱傳遞給該函數,而需要在圖表中該列上定義一個組(如果沒有的話),然後傳遞該組的名稱。示例here

+0

嗨,我已經開始一個新的報告,並將「Campaign」添加爲一個組,現在它顯示爲行組中的table1_Campaign - 但錯誤仍在發生? – JackReacher 2013-05-03 06:42:39

+0

您應該將'Campaign'保留爲列,但在其上定義一個組。更多細節[here](http://popbi.wordpress.com/2012/03/02/ssrs-how-to-add-a-column-group-to-an-existing-table/)。 – davmos 2013-05-03 06:48:22

相關問題