Siebel Reports Administration Guide > Actuate Library Reference > Actuate sscustom Library >

How to Display Revenue Information in Siebel Reports


When you are creating datastreams with Siebel Tools, each field is mapped to a data row variable, of string data type. If the field is defined in the Siebel application as being a currency, then Siebel Tools will map two string variables into the data row:

  • ssFieldName
  • ssFieldName_Formatted

The standard revenue contains the value of the field, contained in a string (for example, "1243" or "1000000"). The formatted revenue will contain the value of the field with the appropriate formatting information for currency for that record (for example, "$1,243" or "1.000.000"). As long as the data does not need to be used in a calculation, the formatted data field is the preferred display method. Standard revenue field (unformatted) is not used in reports due to its localization inability.

The following explains how Siebel reports handle calculated currency.

There are three steps involved in the calculation and display of currencies:

  1. Convert the formatted currency string fetched from the Siebel application to a currency data type value that can be used in arithmetic operations, using the ToCur( ) wrapper.
  2. Perform any calculations.
  3. Display the currency data using txtCurrency as the superclass for the layout field. This changes the calculated currency value back to a formatted string for display purposes. The details are given below.

    Formatting currency string to number for calculation:

    Problem: Actuate conversion functions such as CCur( ) or CDbl( ) do not correctly interpret a formatted currency string if any text is attached to the value.

    For example, CCur(DM 55,77) yields 0.

    Solution: To assure proper conversion from string to number, use ToCur( ) defined in sssiebel.bas. This function removes any nonnumeric content from the string, and then applies CCur( ) to the input string.

    For example, ToCur(DM 55,77) yields 55,77

    Formatting number to currency for display:

    Problem: Actuate cannot format currency values for a specific currency code (Actuate can do it for the system currency only).

    Solution: Use FormatSpecificCurrency( ), defined in sscustom.bas to make sure there is proper currency value formatting for a specified currency code.

    Example: cur = FormatSpecificCurrency(55.77, USD)

One more issue to handle for currencies is multicurrency calculations.

Multicurrency processing is a long-existing issue for reports because of their inability to do conversion between currencies. A solution is to have two values (item and system currency) for any currency type field (revenue, cost, and so on). This way, there is a unified approach to the aggregation of different currency values. System currencies display line items in their item currency formats, and aggregate values are displayed in the system currency format. To support this idea, the business component that supplies a report with data must have each currency field in two flavors: Function-Currency-Value (system-based) and Currency-Value (item currency).

If the text control represents the sum of multiple rows of data in the AFTER section, use the numeric revenue amount. The ValueExp property can be formulated as follows:

FormatSpecificCurrency(Sum(CurrencyValue),"USD").

Actuate cannot sum formatted data, so the expression shown previously will be formatted by the FormatSpecificCurrency( ) function described in the sscustom.bas.

For multicurrency calculations, include the Functional Revenue (the revenue value in the functional currency) and the Functional Currency Code (for example, USD) in your report and subreport fields when you define the ROL file in Siebel Tools. For an example of multicurrency calculations, see the Pipeline Report By Rep (PIPEREP) standard report.

Siebel Reports Administration Guide Copyright © 2009, Oracle and/or its affiliates. All rights reserved. Legal Notices.