Tuesday 30 September 2014

How to comment code in Cognos Report Studio?


Friday, November 16th, 2012
There are 5 ways to give comments in Cognos Report studio

  1. Create new page and use a Boolean variable to hide it
    1. Drag a new report page in the report.
    2. Drag a text item on that page.
    3. Write your comments in that text item.
    4. Make Boolean variable which is always false like 1=0 .
    5. In render variable property of that page select that Boolean.
  2. Using HTML Comments
    1. Insert an HTML item on the page where you like to put your comment.
    2. Write your code like this <!– This is a HTML Comment –!>. It will be commented out.
  3. Using XML Comments
    1. Report studio generated XML for every report specification.
    2. Once you have saved  a report open its XML specification in an editing  tool.
    3. Write your code like thsi <! – This is a XML Comment — >. It will be commented out
    4. Only drawback is you have to open the XML in an editor every time you want to edit the comment.
4. For inline comments like programming languages we can use the following code    
#/*<your comment here>*/# 
for eg
Inline comment in an expression


-







5.  Make a dummy string variable and give code comments in its values.

comment using string variable

No comments:

Post a Comment