2015-01-12 48 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中顯示大量數據? –