textrun 中表达式的值 .... 预期语句结束

value for expression in textrun .... end of statement expected

尝试预览我的报告时出现以下错误:

我使用的公式是:

=String.Format(New System.Globalization.CultureInfo(1033), chrw(123)&"0"&chrw(125)&" "&chrw(40)&"Count"&chrw(58)&" "&chrw(123)&"1"&chrw(125)&chrw(41), IIf(IsNothing(Fields!stepname.Value), "Not specified", Fields!stepname.Value), CInt(Count("")).ToString("###,###,###,##0;-###,###,###,##0;0"), Code.GetCultureInfo()))

这个表达式存放在 textruns xml 字段中:

                  <TextRuns>
                    <TextRun>
                      <Value>the expression is here</Value>
                      <Style>
                        <FontFamily>Tahoma</FontFamily>
                        <FontSize>7pt</FontSize>
                        <FontWeight>Bold</FontWeight>
                        <Color>#ffffff</Color>
                      </Style>
                    </TextRun>
                  </TextRuns>

此公式的先前版本运行良好(现在仍然如此):

=String.Format(New System.Globalization.CultureInfo(1033), chrw(123)&amp;"0"&amp;chrw(125)&amp;" "&amp;chrw(40)&amp;"Count"&amp;chrw(58)&amp;" "&amp;chrw(123)&amp;"1"&amp;chrw(125)&amp;chrw(41), IIf(IsNothing(Fields!stepname.Value), "Not specified", Fields!stepname.Value), CInt(Count("")).ToString(First(Fields!NumberFormat_0_Precision.Value, "DSNumberAndCurrencyInfo"), Code.GetCultureInfo()))

我做错了什么?

请试试这个:

=String.Format(
    New System.Globalization.CultureInfo(1033), 
    chrw(123)&amp;"0"&amp;chrw(125)&amp;" "&amp;chrw(40)&amp;"Count"&amp;chrw(58)&amp;" "&amp;chrw(123)&amp;"1"&amp;chrw(125)&amp;chrw(41), IIf(IsNothing(Fields!stepname.Value), "Not specified", Fields!stepname.Value), 
    CInt(Count("")).ToString("###,###,###,##0;-###,###,###,##0;0"), 
    Code.GetCultureInfo())

看来你最后一个括号太多了