您好我在文本框中运行以下表达式并得到以下错误。我在其他文本框中使用了相同的表达式并且它工作正常,所以我很困惑为什么它不在这个中工作。
=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.
答案 0 :(得分:1)
好设法回答我自己的问题,在'sum'之前不需要'='
=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