2017-03-07 71 views
1

你好,我在文本框中運行以下表達式,並獲取下面的錯誤。我在其他文本框中使用了相同的表達式,它工作正常,所以我很困惑,爲什麼它不能在這個工作。textrun錯誤表達式預計

=sum(IIF(Fields!Fieldname1.Value = "A" and Fields!Fieldname2.Value = "Red", Fields!Total.Value, Nothing))/1675 * 100 OR =sum(IIF(Fields!Fieldname1.Value = "A" and Fields!fieldname2.Value = "Blue", Fields!Total.Value, Nothing))/1702 * 100  

The Value expression for the textrun ‘Textbox278.Paragraphs[0].TextRuns[0]’ contains an error: [BC30201] Expression expected. 

回答

1

好了「和」

=sum(IIF(Fields!Fieldname1.Value = "Red" and Fields!Fieldname2.Value = "Red", Fields!Total.Value, Nothing))/1675 * 100 OR sum(IIF(Fields!Fieldname1.Value = "Blue" and Fields!Fieldname2.Value = "Blue", Fields!Total.Value, Nothing))/1702 * 100 
之前成功地回答我的問題,並不需要「=」