2015-01-12 47 views
1

当试图预览我的报告,我发现了以下错误:值....语句的结束预计

enter image description here

,我使用的公式是:

    <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("###,###,###,##0;-###,###,###,##0;0"), Code.GetCultureInfo())) 

该表达式是textruns XML字段内提出这个公式的前一版本运行良好(和仍然如此):

=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())) 

我在做什么错?

回答

2

请试试这个:

=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()) 

好像你已经有一个支架到底

+0

太感谢你了。我会在9分钟内接受你的答案 –

+0

没问题 - 我真的很高兴它帮助 - 我也有同样的问题,同时开发报告服务报告:)问候。 –

+0

如果您有机会,您是否知道报告在网上crm中显示无数据的原因,而在VIsual Studio中显示大量数据? –