Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Using the CCur function in Voyager Prepackaged Access Reports

    • Product: Voyager
    • Relevant for Installation Type: Multi-Tenant Direct, Dedicated-Direct, Local, TotalCare

     

    Question

    Provide some tips for using the CCur Function (Currency Function) in Voyager Prepackaged Access Reports.

    Answer

    The CCur function converts a value to currency.  

    Format: CCur(AMOUNT)

    Example: CCur(5396/100)=$53.96

    You can easily test the CCur function call by putting the function directly into a query as shown below (PRO TIP: don't forget about using the Access Zoom feature by placing your cursor in the field and pressing SHIFT-F2 in order to make it easier to see):

    clipboard_e3d1450e03dac104d705d7599d44f94b6.png

     

    clipboard_e067cf13c4f3a01b16f96aeb4676ca901.png

     

    Base Currency Conversion (for dollars and other 100-based currencies): 

    Example:

    AMT: CCur([AMOUNT]/100)

    More generally, include the BASE_CURRENCY Table in your query (see following example) and use:

    AMT: CCur([AMOUNT]/10^[BASE_DECIMALS])

    Foreign Currencies

    Example:

    AMT: CCur(([LINE_PRICE]/([CONVERSION_RATE]/100000))/10^[BASE_DECIMALS])

    clipboard_e3b1b494b67caaf7111e3fa15024115b2.png

     

    clipboard_e62f7e898fa348761a5e90f42aaa6e46f.png

    PRO TIP: CURRENCY_CODE shows the Currency used.

    Additional Information

    For a more basic description of formatting currency using CCur see: How to format a value as currency in Voyager Prepackaged Access Reports

     

    Constructing custom SQL queries by request and troubleshooting unexpected results from customer-created SQL queries falls outside the scope of Support. The above has been posted for informational purposes.  Voyager-L and Developer Network are useful resources for finding helpful custom SQL or obtaining assistance from peers in troubleshooting custom queries.

     


    • Article last edited: 03-03-2021