Selecting an Extended Currency Symbol

Topics:

How to:

Reference:

You can select a currency symbol for display in report output regardless of the default currency symbol configured for National Language Support (NLS). Use the extended currency symbol format in place of the floating dollar (M) or non-floating dollar (N) display option in a Master File or in a DEFINE command in a procedure.

When you use the floating dollar (M) or non-floating dollar (N) display option, WebFOCUS prints the currency symbol associated with the default code page. For example, when you use an American English code page, the dollar sign is displayed as the currency symbol.

The extended currency symbol format allows you to display a symbol other than the dollar sign. Using the extended currency symbol format, you can display the symbol for a United States dollar, a British pound, a Japanese yen, or the euro.

The extended currency symbol formats are available for numeric formats (I, D, F, and P).

Reference: Extended Currency Symbol Formats

The following guidelines apply:

  • A format specification cannot be longer than eight characters.
  • The extended currency option must be the last option in the format.
  • The extended currency symbol format cannot include the floating (M) or non-floating (N) display option.
  • A non-floating currency symbol is displayed only on the first row of a report page. If you use field-based reformatting (as in the example that follows) to display multiple currency symbols in a report column, only the symbol associated with the first row is displayed. In this case, do not use non-floating currency symbols.

Syntax: How to Use an Extended Currency Symbol Field Format

You can also set an extended currency symbol by specifying it in the format of a field. You can set a currency symbol field format in a DEFINE or COMPUTE field or in a function.

numeric_format{:|!}option

where:

numeric_format

Is a valid numeric format (data type I, D, F, or P).

{:|!}

Either a colon (:) or exclamation point (!) is required. Note that only the colon is invariant across code pages, and therefore may be preferable.

option

Determines the currency symbol that is displayed and where the symbol appears. Possible values are:

  • d displays a non-floating dollar sign.
  • D displays a floating dollar sign.
  • e displays a non-floating euro symbol.
  • E displays a floating euro symbol.
  • F displays a euro symbol to the right of the number.
  • G displays a dollar sign to the right of the number.
  • l displays a non-floating British pound sterling symbol.
  • L displays a floating British pound sterling symbol.
  • y displays a non-floating Japanese yen symbol.
  • Y displays a floating Japanese yen symbol.

Example: Displaying Extended Currency Symbols

The following request displays the British pound sterling symbol on the row that represents England, the euro symbol on the row that represents Italy, and the Japanese yen symbol on the row that represents Japan.

SET PAGE-NUM = OFF
DEFINE FILE CAR
CFORMAT/A8 = DECODE COUNTRY('ENGLAND' 'F12.1C!L' 'JAPAN' 'D12!Y'
             ELSE 'D12.2!E');
END
 
TABLE FILE CAR
PRINT SALES/CFORMAT DEALER_COST/CFORMAT
BY COUNTRY
  WHERE COUNTRY EQ 'ENGLAND' OR 'JAPAN' OR 'ITALY'
  WHERE SALES GT 0
ON TABLE SET STYLE *
TYPE = REPORT, GRID = OFF,$
ENDSTYLE
END

The output is:

Displaying Extended Currency Symbols

You can also use an extended currency symbol in a report by applying it from the user interface in InfoAssist+ or App Studio.

  • In InfoAssist+:
    • Select a numeric field in your report. On the Field tab, in the Format group, open the Change currency options drop-down menu. You can select a currency symbol and where to position it.
    • Select a numeric field in your report. On the Field tab, in the Format group, open the main drop-down menu and click More options.... The Field Format Options dialog box opens. Open the Currency Symbol menu and select an option. You can select a currency symbol and where to position it, as well as set other formatting options.
  • In App Studio:
    • Select a numeric field in your report. On the Appearance tab, in the Format group, open the Currency drop-down menu. You can select a currency symbol and where to position it.

Reference: Specifying an Extended Currency Symbol

The CURRSYMB parameter specifies a symbol used to represent currency when a numeric format specification uses the M or N display options. The default currency symbol depends on the code page being used.

The syntax is:

SET CURRSYMB = symbol

where:

symbol

Is any printable character or a supported currency code. The following are possible values.

Note: In order to specify a dollar sign ($) as the character, you must enclose it in single quotation marks (').

  • USD or '$'. Specifies U.S. dollars.
  • GBP. Specifies the British pound.
  • JPY. Specifies the Japanese yen.
  • EUR. Specifies the euro.
  • NIS. Specifies the Israeli new sheqel.

Reference: Setting the Symbol for D or d Formats

The CURSYM_D parameter specifies the characters used to represent currency when a numeric format specification uses the !D, :D, !d, or :d display options, which by default display a floating (D) or fixed (d) dollar sign to the left of the number.

The syntax is:

SET CURSYM_D = symbol

where:

symbol

Is up to four printable characters.

Reference: Setting the Symbol for E or e Formats

The CURSYM_E parameter specifies the characters used to represent currency when a numeric format specification uses the !E, :E, !e, or :e display options, which by default display a floating (E) or fixed (e) euro sign to the left of the number.

The syntax is:

SET CURSYM_E = symbol

where:

symbol

Is up to four printable characters.

Reference: Setting the Symbol for the F Format

The CURSYM_F parameter specifies the characters used to represent currency when a numeric format specification uses the !F or :F display option, which by default displays a floating euro sign to the right of the number. This command supports adding a blank space between the number and the currency symbol.

The syntax is:

SET CURSYM_F = symbol

where:

symbol

Is up to four printable characters. If the characters include a blank space, they must be enclosed in single quotation marks.

Reference: Setting the Symbol for the G Format

The CURSYM_G parameter specifies the characters used to represent currency when a numeric format specification uses the !G or :G display option, which by default displays a floating dollar sign to the right of the number. This command supports adding a blank space between the number and the currency symbol.

The syntax is:

SET CURSYM_G = symbol

where:

symbol

Is up to four printable characters. If the characters include a blank space, they must be enclosed in single quotation marks.

Reference: Setting the Symbol for L or l Formats

The CURSYM_L parameter specifies the characters used to represent currency when a numeric format specification uses the !L, :L, !l, or :l display options, which by default display a floating (L) or fixed (l) British pound symbol to the left of the number.

The syntax is:

SET CURSYM_L = symbol

where:

symbol

Is up to four printable characters.

Reference: Setting the Symbol for Y or y Formats

The CURSYM_Y parameter specifies the characters used to represent currency when a numeric format specification uses the !Y, :Y, !y, or :y display options, which by default display a floating (L) or fixed (l) Japanese yen or Chinese yuan symbol to the left of the number.

The syntax is:

SET CURSYM_Y = symbol

where:

symbol

Is up to four printable characters.

Using a Currency ISO Code

You can specify an ISO code to display automatically for fields with monetary values. By default, this code only appears as a replacement when the currency symbol cannot be displayed by the code page in effect. However, you can determine whether you want the ISO code to always display or never display instead.

These values can be set for an individual procedure using the syntax below, or can be set at the server level for all procedures run on that server. For more information, see How to Change LOCALE Settings on the WebFOCUS Reporting Server.

Reference: Specifying the Currency ISO Code

The CURRENCY_ISO_CODE parameter defines the ISO code for the currency symbol to use. By default, the server uses the currency code that matches the configured language code, but you can set a currency code manually.

The syntax is:

SET CURRENCY_ISO_CODE = iso

where:

iso

Is a standard three-character currency code, such as USD for US dollars or JPY for Japanese yen. The default value is default, which uses the currency code for the configured language code.

Reference: Displaying a Currency ISO Code

You can determine when you want a currency ISO code to display using the CURRENCY_PRINT_ISO parameter. By default, the ISO code only appears when the currency symbol cannot be displayed by the code page in effect.

The syntax is:

SET CURRENCY_PRINT_ISO = {DEFAULT|ALWAYS|NEVER}

where:

DEFAULT

Replaces the currency symbol with its ISO code when the symbol cannot be displayed by the code page in effect. This is the default value.

ALWAYS

Always replaces the currency symbol with its ISO code.

NEVER

Never replaces the currency symbol with its ISO code. If the currency symbol cannot be displayed by the code3 page in effect, it will not be printed at all.

Note: Using a Unicode environment allows the printing of all currency symbols, otherwise this setting is needed.

WebFOCUS

Feedback