Chart axis and tooltip localization for custom data items in IBM Cognos Report Studio

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.

Applicability

IBM Cognos 10.2 and higher versions.

Assumptions

You should be an IBM Cognos report author or one with good knowledge on IBM Cognos Report Studio 10.2.1.1

Steps

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.

  1. Open IBM Cognos Report Studio and create a new chart report using the GO Date Warehouse (query) package.
  2. In this example use the Stacked Column chart with 3D effect chart type.
  3. 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 .

    ([go_data_warehouse].[Sales and Marketing (query)]. [Returned items (query)].[Products].[Product line])
    ([go_data_warehouse].[Sales and Marketing (query)]. [Returned items (query)].[Retailers].[Region])
    ([go_data_warehouse].[Sales and Marketing (query)]. [Returned items (query)].[Retailers].[Retailer country])
    ([go_data_warehouse].[Sales and Marketing (query)]. [Returned items (query)].[Returned items fact].[Return quantity])

  4. 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.

    image

  5. 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.

    image

  6. 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.

    image

  7. 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.

    image

  8. 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.

    image

  9. Select the language (French) from Conditional Explorer – Report Language1 then select the axis title. Chart text item should be shown in the property section.

    image

  10. Using Text Variable property set Report Language1. Set Source Type property to Text and provide the translated string under Text property.

    image

  11. By following above steps we can get the axis title localized but the tooltip would still show ‘Area’ not ‘Area_French’.

    image

  12. Now to localize the tooltip as well, select the Chart Node Member and turn on the Custom Label property to Show.

    image

  13. Select the custom label and then the language from Conditional explorer Report Language VariableChart text item should be shown in the Property section
  14. Using Text Variable property set Report Language1. Set Source Type property to Text and provide the translated string under Textproperty.

    image

  15. When report is executed it will show both axis title and tooltip localized for custom data items.

    image

  16. The same technique can be followed if custom data items are used in Measure (y axis) section.

Download

Submitted by Kalyani Raut, IBM Software Lab, IBM Predictive Maintenance and Quality and Swamy ST, IBM Software Lab, IBM Predictive Maintenance and Quality

Original link : https://www-304.ibm.com/connections/blogs/basupportlink/entry/chart_axis_and_tooltip_localization_for_custom_data_items_in_ibm_cognos_report_studio?lang=en_us