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):
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])
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