2016-07-22 55 views
0

「對象」沒有定義我有特殊的問題:當我嘗試部署我的報告,我得到以下錯誤:當SSRS:運營商以「 - 」類型上部署

Error 1 An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC30452] Operator '-' is not defined for types 'Object' and 'Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field'.’. 0 0

不過我構建和運行(或預覽)報告不會發生錯誤,並且它可以工作。

我的問題是:1。 這是什麼原因? 2.如何跟蹤誤差,因爲它適用於Visual Studio的環境?

謝謝你的幫助。

回答

0

它看起來像你想比較兩個不同類型的對象,特別是你想爲一個字符串對象或一個非數字對象使用-。看看你的表情,特別是那些有負號的表情。你可能只會缺少一些括號。例如:

=Fields!Total.Value *10/(Fields!Other_Total) 
--should be-- 
=(Fields!Total.Value *10)/(Fields!Other_Total) 

You have attempted to use a unary operator (+, -, or Not) on a type, such as a String, for which it is not defined

https://msdn.microsoft.com/en-us/library/cb4637x6.aspx