Crystal Reports for Eclipse Designer Guide

CDbl

CDbl and ToNumber are equivalent functions.
Description
CDbl returns a Number value created by converting the given Number, Currency or String type argument to a Number value.
Overloads
  • CDbl (number or currency)
  • CDbl (string)
  • Arguments
  • number or currency is a Number or Currency value or expression.
  • string is a String value or expression.
  • Returns
    Number value
    Action
    CDbl returns a Number value created by converting the given Number, Currency or String type argument to a Number value. If the conversion cannot be done, an error occurs.
    Examples
    CDbl ({Orders.Order Amount})
    Returns the value of the Currency field {Orders.Order Amount} converted to Number type.
    CDbl ("$120.20")
    Returns the Number value of 120.2.
    Comments
    You can use the IsNumeric (str) or NumericText (str) function to check if the String argument can be converted to a Currency before doing the actual conversion. That way, if the conversion cannot be done, you can handle the situation appropriately.



    SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/