Hi,
This applies to any location that you can edit an expression via the expression editor. FM, Reports, Calculations, Filters etc.
In Compatible Query Mode expressions can be commented only via the Embedded Macro Expression and so the following are valid forms:
Expression text: The expression is effectively the value 14
#/* cqm and dqm compatible one line comment, via a macro expression */#
14
# // comment inside a macro function, to end of line
#
# /* multi
line
comment in a macro expression */ #
#
/* inside a macro expression
a multi-line comment
*/
#
In Dynamic Query Mode the above methods are valid as well as all the following ones:
Expression text: The expression is effectively the value 14
Tested this with 11.0.13 , 11.1.1 and 11.1.7
// comment to end of line
14 // the rest of the line is a comment
/* multi-line comment, here used on a single line */
/* multi-line comment
using two lines */
I will put in a request to update the documentation around this.
// Henk
------------------------------
HENK CAZEMIER
------------------------------
Original Message:
Sent: Wed December 30, 2020 03:50 AM
From: Ralf Roeber
Subject: HINT: add comments to your Report QueryItems
Been working with Cognos for 17+ years now ... and thought, I know it all ... :-)
Found this nice option to add comments in queryItems to make report-queries easier to understand:
#/*Here are the comments*/#
Source: How to add comments for expressions in Report Authoring tools in Cognos Analytics 11.
Hope this helps.
------------------------------
Ralf Roeber
------------------------------
#CognosAnalyticswithWatson