Cognos Report Documentation: Add a Comment or Note to an Expression

Have you ever written a complex filter or tricky case statement in a Cognos report and then forgotten exactly why you needed it, or how it worked?  Perhaps you’ve inherited a report from another author and wished you had some documentation to help you make heads or tails of a data calculation?

With this technique, you can leave yourself - or other authors trying to understand your report- a helpful hint or two embedded in an expression definition without interfering with the validation or rendering of the actual expression. 

The text of the comment can be as long as necessary and can cover multiple lines, and it can be placed before or after the expression. Simply use a specific set of characters at the beginning and end of your comment, and Cognos will be signaled to ignore anything in between those characters. Pay attention to the order of the characters, as it is important. Begin your comment with these three characters #/* and end it with */#

See visual examples below:



Article ID: 83981
Mon 7/29/19 4:05 PM
Tue 11/19/19 2:17 PM