1. 程式人生 > >RDLC報表 "錯誤號"

RDLC報表 "錯誤號"

原文地址:http://hi.baidu.com/longsihanyuan/item/d16bc0c1a2d72244a9ba94b4

主要是數值型別的問題。

1、如果型別是
         =金額+Fields!JinE.Value 報錯,
     請轉型為 =金額+Fields!JinE.Value.ToString()

2、如果仍有問題,請嘗試:
          ="金額:"+CDec(Fields!JinE.Value).ToString()+" 元"

3、如果是兩個數值相除,除數檢驗
          =Fields!B.Value / Fields!A.Value
      請轉型為 IIf(IsNothing(Fields!A.Value),   0,   Fields!B.Value / Fields!A.Value)

4、有關sum的
     =IIf(
          CInt(SUM(IIf(IsNothing(Fields!A.Value),0,Fields!A.Value))) = 0,
          0,
          FormatNumber(
                 (
                     SUM(
                             IIf(
                                  IsNothing(Fields!B.Value),
                                   0,
                                  CDbl(Fields!B.Value)
                             )
                      )*100
                     /
                     SUM(
                            IIf(
                                  IsNothing(Fields!A.Value),
                                  0,
                                  CDbl(Fields!A.Value)
                             )
                       )
                  ),
                  2)

 

5.=IIf(Val(Fields!A.Value)=0,0,Val(Fields!B.Value) / Val(Fields!A.Value)) (包含聚合函式)