COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tjohnson3050 on 15 Aug 2012 04:21:19 PM

Title: Add comments in Report Studio
Post by: tjohnson3050 on 15 Aug 2012 04:21:19 PM
Although it is not documented, comments can be added inside a query item expression using the following syntax:

#/*Here are the comments*/#
Title: Re: Add comments in Report Studio
Post by: bdbits on 20 Aug 2012 09:26:07 AM
Thanks for sharing this. I have sometimes craved embedded comments and thought it was not possible.
Title: Re: Add comments in Report Studio
Post by: tjohnson3050 on 20 Aug 2012 09:54:54 AM
The same for me.  I always thought it wasn't possible until I stumbled on a KB article on the IBM site while searching for something else...
Title: Re: Add comments in Report Studio
Post by: Galstonian on 22 Nov 2012 11:43:17 AM
I think this works for some Report Expressions but not all.  Examples seem to show query items.
Does anyone know how to add comments in a report expression used for a Text item? 
Using the method described in this thread results in the following:

CRX-YXX-4010 Parsing error on or around position 0 in the expression: #/* comment */#
Title: Re: Add comments in Report Studio
Post by: Lynn on 27 Nov 2012 08:23:27 AM
Are you certain there isn't something else that is wrong in your expression? I've used this technique for years on all sorts of expressions and never run into what you are describing.

If you remove the comment does the error persist? If you move the comment to the bottom does the position of the parsing error change? I don't think the comments are including in the position of the expression at all.