IBM Support

How to add comments for expressions in Report Studio

Troubleshooting


Problem

This document explains how to add comments in the expressions that may be created in Report Studio to increase the maintainability of code that might be written or used in the expressions.

Resolving The Problem

Although, currently there is no documented support from the Report Studio user interface to add/embed comments in the reports or report expressions, the following workaround will allow to embed comments within an authored expression.

For example, create a calculated data item called Test with the following expression in the expression editor:

#/*Here are the comments*/#

to_char([Namespace].[Query Subject].[Dates], <some date format>)

With the above, the expression should validate without any problems.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2.2;10.2.1;10.2;10.1.1;10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21340808