If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Commentary Boxes inputted on reading.

Started by holsy1982, 26 Jan 2011 03:22:13 AM

Previous topic - Next topic

holsy1982

Does anybody know of any method which would allow the reader of a report to add commentary to a report which others would then be able to view.  I don't want to allow the user access to Report studio, I'd much rather that when he views he can add them and save them.

(I should probably note that I'm currently using Cognos 8.1)

holsy1982

I managed to complete this using a PHP script which saves the comments to a local Mysql server.  This is then displayed using a HTML item within Cognos.

The only thing I'm currently trying to do is to change the URL the HTML item runs dependant upon who is reading the report.  This will allow me to give or deny access to changing the comments dependant upon the users details

ie if username = 'Bob' then URL = http://intranet/cognos_utils/Commentary.php?allow_submit=1' else 'http://intranet/cognos_utils/Commentary.php?allow_submit=0'

melee

Ahhh! PHP and MySQL... Now you're speaking my language. I'd approach this using AJAX and a POST request.

You're going to need to output the name of the user somewhere on the report - just use a singleton, shouldn't be too big of a deal. Use Javascript to transverse the document and grab their name. POST the name variable to your script, where you can use IF logic to determine whether or not there should be an edit button. I'd imagine it would go something like this:


<?php

// Assuming Bob can edit
if ($_POST['user']) {
echo 
$commentStream;
     if (
$_POST['user'] == 'Bob') {
          echo 
$commentEditCode;
     }
}

?>



All you would need to do at that point is inject the HTML from the form back into the HTML item.