Using the Enhanced Format Dialog Box

How to:

The Format dialog box in the Report canvas has been enhanced to make it easier to select formats and options for columns in a report. The Format dialog box is shown in the following image.

From the Format dialog box, you can implement options to display percentage and localized currency values. Both of these features enable you to customize your report output and your target audience.

Procedure: How to Format Percentages

  1. Using the wf_retail file, create a report in the Report canvas and add the following columns to your report.
    • Cost of Goods
    • Revenue
    • Gross Profit
  2. Sort the report by Product Category.
  3. Create a COMPUTE command to determine the profit margin for each product, for example:
    ProfitMargin=Gross Profit/Revenue
  4. Run the report.

    Notice that all values in the ProfitMargin column are decimal values, less than one (1), as shown in the following output.

  5. To change the ProfitMargin values from a decimal to a percentage, you can use the Compute Percent option. This format option automatically multiplies the decimal value by 100 and then adds a percent symbol.

    To redisplay the ProfitMargin values as percentages, instead of decimals, you can either:

    • Select the ProfitMargin column in the report and then select Computed Percentage from the % menu in the Appearance tab.
    • Right-click the ProfitMargin column, click Format, and then select Compute Percent in the Format dialog box, as shown in the following image.
  6. Click OK.
  7. Run the report.

    Now that the Compute Percent option is enabled, our report output shows percentages for the ProfitMargin column, as shown in the following output.

    Note: Compute Percent multiplies the value by 100 before adding the percent symbol, so if your data is already a percentage, you will want to use the Percentage option in the Appearance tab or the Show Percent option in the Format dialog box.

Procedure: How to Customize Currency Values

You can easily apply currency formatting to any numeric column. When you select a numeric column, the Appearance tab includes a currency symbol menu that includes basic currency formatting options.

  1. Using the same report created in How to Format Percentages, click the Revenue column and open the currency menu, as shown in the following image.

    You can select from dollar, euro, pound, and yen symbols, or use the default currency symbol for the code page that you are using. You can also choose whether the symbol is:

    • Floating, which appears next to each value in the column.
    • Fixed, which appears only in the first row of each column.
    • Appears on the right for euro and dollar values.
  2. Select Fixed Dollar.

    Note: You can access the same currency format options by right-clicking the column, clicking Format, and using the Currency Options drop-down menus in the Format dialog box.

  3. To access additional currency codes and symbols, you must access the Format dialog box from the Computed Field Creator. For example, to show the revenue in Brazilian real, create a COMPUTE command containing Revenue and multiply it by the exchange rate, which is 3.21.
    RevenueReal = Revenue * 3.21
  4. Click Format, and then, from the Currency Options menu, select Locale options.

    You can choose any currency for which there is an ISO code available. You can also set the position of the currency symbol.

  5. Select BRL from the ISO Code list and accept the default position, as shown in the following image.
  6. Run the report.

    The RevenueReal column displays the values with the real symbol (R$), as shown in the following output.

WebFOCUS

Feedback