Error in formula field when run the crystal report

Last post 07-06-2009 5:59 AM by jeyaseelan@ajsquare.net. 2 replies.

Sort Posts:

  • Error in formula field when run the crystal report

    06-17-2009, 1:16 AM
    • Member
      point Member
    • avani_bece
    • Member since 05-16-2009, 7:39 AM
    • Posts 6

    Hello all,

    I have made one formula field namely OrderQty and its formula contains the simple airithmatic operations using the fields of stored procedure itself,but when i am trying to run the report i got the following error

    "The String Is Non-Numeric"

    Formula field's formula is as shown below....

    stringVar OrderQty;
    WhilePrintingRecords;

    If {spSelectAutoPOItem.StandardPackingQty}>0 Then
        If CDbl ({spSelectAutoPOItem.OrderQty}) > CDbl({spSelectAutoPOItem.ViableOrderQty}) And CDbl({spSelectAutoPOItem.ViableOrderQty})  > 0 Then
            If {spSelectAutoPOItem.StandardPackingQty} Mod Cdbl( {spSelectAutoPOItem.ViableOrderQty}) = 0 Then
               If CDbl({spSelectAutoPOItem.ViableOrderQty}) > {spSelectAutoPOItem.StandardPackingQty} Then
                 OrderQty := CStr({spSelectAutoPOItem.ViableOrderQty}) + {spSelectAutoPOItem.StockUnit}
               Else
                 OrderQty := CStr({spSelectAutoPOItem.StandardPackingQty}) + {spSelectAutoPOItem.StockUnit}
            Else
                 OrderQty := Cstr({spSelectAutoPOItem.StandardPackingQty}) + "/" + CStr({spSelectAutoPOItem.StandardPackingQty} * 2) + {spSelectAutoPOItem.StockUnit}
                                
         Else
             If {spSelectAutoPOItem.StandardPackingQty} Mod CDbl({spSelectAutoPOItem.OrderQty}) = 0 Then
               If CDbl ({spSelectAutoPOItem.OrderQty}) > {spSelectAutoPOItem.StandardPackingQty} Then
                 OrderQty := {spSelectAutoPOItem.OrderQty}
               Else
                 OrderQty := CStr({spSelectAutoPOItem.StandardPackingQty}) + {spSelectAutoPOItem.StockUnit}
             Else
                 OrderQty := CStr((CDbl({spSelectAutoPOItem.ViableOrderQty}) - CDbl ({spSelectAutoPOItem.OrderQty})) + CDbl ({spSelectAutoPOItem.OrderQty})) + "/" + CStr({spSelectAutoPOItem.StandardPackingQty} * 2) + {spSelectAutoPOItem.StockUnit}
               
       Else
          If CDbl ({spSelectAutoPOItem.OrderQty}) > CDbl({spSelectAutoPOItem.ViableOrderQty}) And ToNumber({spSelectAutoPOItem.ViableOrderQty}) > 0 Then
             OrderQty := CStr(CDbl({spSelectAutoPOItem.ViableOrderQty})) + {spSelectAutoPOItem.StockUnit}
          Else
             OrderQty := {spSelectAutoPOItem.OrderQty};

    OrderQty

     

    Please do help me,it will be a favour for me....

    Thanks in advance,waiting for the reply.....

    Thanks & Regards,

    Avani
  • Re: Error in formula field when run the crystal report

    06-18-2009, 12:25 AM

    CStr is Non-numeric

    use CInt instead.

  • Re: Error in formula field when run the crystal report

    07-06-2009, 5:59 AM

    avani Change the datatype into int, now i think its string. Try it.

    Any doubts please feel free to ask me.

    If this post is answer of your question then don't forgot to Click Mark As Answer.

    Thanks & Regards,
    J.Jeyaseelan
Page 1 of 1 (3 items)