Format data in a report to improve readability. For example, you can show all date values in the order year, month, and day. If you do not set properties here, data is formatted according to the properties set in the model. If the properties were not set in the model, data is formatted according to the International Components for Unicode (ICU) formats.
You can also format data based on a condition or
specify the format for a particular object
.
When using a Cognos cube as a data source, mixed currency values use the asterisk character (*) as the unit of measure. Mixed currency values occur when you calculate values with different currencies.
The same behavior occurs for SAP BW data sources.
From the Data menu, click Default Data Formats.
In the Format type box, click a format type.
The properties that you can set for the selected format type appear in the Properties box.
If you clicked the Currency format
type and require different currencies in the report, click the add
button . In the Currencies dialog
box, select the currencies you want and click OK.
For example, you may have one column whose values are in euros and another column whose values are in US dollars.
Set the properties that you want.
If you added currencies in step 4, click each one and set the properties you want. If you did not add any currencies, any properties you set will apply to all currencies.
For properties in which you type meta-characters that represent certain types of information, such as YYYY-MM-DD for dates, the meta-characters required depend on the authoring language specified for the report. For more information, see Using Patterns to Format Data.
If you specify a value for the Pattern property, all other formatting properties are ignored, with the following exceptions:
Some properties are language-sensitive and should only be changed with caution.
Click OK.
The data formatting properties you set are applied to objects only in the current layout. If a data item contains values in multiple currencies, but only a subset of those currencies have defined formats, the default format for the locale you are working in is applied to values for which no format is specified.
Specify the format for a particular object if you are not getting the results you want. For example, you add a measure to a report, and you want to see two decimals when you run the report. You set the number of decimals to two for the Number format type for the current layout. However, when you run the report, you see more than two decimals for the measure. To get the results you want, you must map the measure to the Number format type.
Click the object.
In the Properties pane, double-click the Data Format property.
Under Format type, click the format type you want to apply to the object.
To override any of the properties of the format type that were defined for the current layout, in the Properties box, click the property and specify its value.
Click OK.
When specifying the number of decimals, Cognos 8 uses the IEEE 754 default rounding mode known as half even. With half even rounding, numbers are rounded toward the nearest truncated value, unless both truncated values are equidistant, in which case the value ending in an even digit is chosen, as follows:
if the digit immediately after the precision to be shown is greater than 5, the number is rounded up.
if the digit immediately after the precision to be shown is less than 5, the number is rounded down.
if the digit immediately after the precision is a 5, the number is rounded down when the preceding digit is even and rounded up when the preceding digit is odd.
For example, if you specify no decimals, the number 78.5 is rounded to 78, while the number 73.5 is rounded to 74.
In addition, if the maximum number of decimals is lower than the actual number of decimals in the number, the number is rounded to the maximum number of decimals.
Report Studio contains an extensive library of customized properties adapted to users from different regions who speak different languages. If, for example, a modeler specifies that a given data item is a currency, only the proper currency symbol must be specified. When reports are created, Report Studio automatically adapts the format of the currency numbers to each user according to the content language specified in Cognos Connection.
When modelers or report authors specify properties, these properties override user preferences and risk creating inconsistent formatting for users of other cultures. It is usually much easier and safer to let Report Studio take care of formatting. For example, for the date format type, different regions use different characters to represent the date separator. If you specify a date separator, you may confuse users in other regions.
The following data formatting properties are locale-sensitive.