This tip provides generic steps to make chart axis titles and tooltips to support localization when custom data items are used to design it.
When a custom data item or in other words data items created at report level are used either in chart Measure or(and) Category section then a few additional settings needs to be done to make axis titles and tooltip information(hover mouse pointer on markers or bars) localized.
If the Framework model is translated in required languages then query items referred in reports will automatically support localization. But in cases where calculated data items are created at report level, then this article will help report authors to perform the required translation at report end to support localization.
IBM Cognos 10.2 and higher versions.
You should be an IBM Cognos report author or one with good knowledge on IBM Cognos Report Studio 10.2.1.1
The following steps will help to localize the chart axis title and tooltips when you have custom data items in the chart.
In this example, Returned items (query) namespace under Sales and marketing (query) folder of GO Data Warehouse (query) package is used.
The following steps are to be used for designing the report.
- Open IBM Cognos Report Studio and create a new chart report using the GO Date Warehouse (query) package.
- In this example use the Stacked Column chart with 3D effect chart type.
- In the Query Explorer select the chart query (Query 1). Drag Product line from Products query subject, Return quantity from Returned items fact query subject, Region and Retail country from Retailers query subject of the Returned items (query) namespace .
_dat a_wa reho use] .[Sa les and Marketing (query)]. [Returned items (que ry)] .[Pr oduc ts]. [Pro duct line])
_dat a_wa reho use] .[Sa les and Marketing (query)]. [Returned items (que ry)] .[Re tail ers] .[Re gion ])
_dat a_wa reho use] .[Sa les and Marketing (query)]. [Returned items (que ry)] .[Re tail ers] .[Re tail er country])
_dat a_wa reho use] .[Sa les and Marketing (query)]. [Returned items (query)].[Returned items fact].[Return quantity])
- From the toolbox drag Data item to the Query Explorer window and name it as Area. Area is a concatenation of Region and Retailer country.
Area —–> [Region]|| ‘ (‘ || [Retailer country] || ‘)’.
Area is the custom data item created in this step.
- On the Page Explorer drag Return quantity to Default measure (y-axis) section, Area to Categories (x-axis) section and Product line toSeries section on the chart.
- When we execute this report for instance in French locale then only the data items which are directly used from a translated Framework Manager model are displayed in French whereas Area which is a custom data item is shown with default English language as its not localized yet at report level. Also, if we see the tooltip that also shows Area in English.
- In order to localize the axis title, create a Report Language Variable with the languages which will be supported by the report from Condition Explorer.
- Expand the Axis titles and select the x-axis. Set the Default Title property under General section to No. Double click on the axis title and rename it to Area.
- Select the language (French) from Conditional Explorer – Report Language1 then select the axis title. Chart text item should be shown in the property section.
- Using Text Variable property set Report Language1. Set Source Type property to Text and provide the translated string under Text property.
- By following above steps we can get the axis title localized but the tooltip would still show ‘Area’ not ‘Area_French’.
- Now to localize the tooltip as well, select the Chart Node Member and turn on the Custom Label property to Show.
- Select the custom label and then the language from Conditional explorer Report Language Variable. Chart text item should be shown in the Property section
- Using Text Variable property set Report Language1. Set Source Type property to Text and provide the translated string under Textproperty.
- When report is executed it will show both axis title and tooltip localized for custom data items.
- The same technique can be followed if custom data items are used in Measure (y axis) section.
Submitted by Kalyani Raut, IBM Software Lab, IBM Predictive Maintenance and Quality and Swamy ST, IBM Software Lab, IBM Predictive Maintenance and Quality