Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 -- Report Studio Comments box

I came across a posting on http://businessintelligence.ittoolbox.com that discussed adding an editable comment box for a Cognos Report Studio report. 

 

Here is how this could be implemented in Cognos 8 by using .ASP pages.

 

  1. Update your database source to contain an additional column named “Comments”.

 

  1. Update your Framework Manager model to have an updated Query Subject that contains the new “Comments” column.

 

  1. Generate a sample report from within Report Studio named “InteractiveComments” that contains an HTML Item that references an .ASP page.  You can display the comments by dragging the “Comments” model item to your report page.

 

For example, <a href="http://localhost/cognos8/samples/InteractiveComments/Comments.asp">Add Comments</a>

 

  1. Using Notepad, or a HTML editor, create an .ASP page called “Comments.asp” that has a submit button with the form action to post to “Results.asp”

 

  1. Create the “Results.asp” .ASP file, which will contain your .ASP logic for inserting the recordset to your database.  There are many sites on the web that can help you with this task.  (http://www.aspx.com, http://www.webmonkey.com, http://www.w3schools.com)

 

On this page you should also add a hyperlink reference back to the Cognos Connection location of your Report Studio report.   

 

For example, Click <a href="http://localhost/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27GOSR%27%5d%2freport%5b%40name%3d%27InteractiveComments%27%5d">here</a> to return to the report.

 

  1. This process can be done using any web scripting language, and I would also recommend making sure that you are able to associate an ID value to the report’s comment.