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

Adding 'Owner' to the connection GUI replacing 'Modified'

Started by blom0344, 14 Apr 2010 01:47:57 AM

Previous topic - Next topic

blom0344

There is some documentation on adding and hiding UI Elements in Cognos connection, but I was wondering if anyone has a notion to add 'Owner' to the GUI instead of the fickle 'Modified' element.
Simply opening the properties of a report changes this modified date, making it pretty useless. Having the owner in the GUI would be a lot more usefull.
I fear though that this is hardcoded in the page definition and not configurable..

CognosPaul

Wow, this sounds like a really fun challenge. In this case the GUI is definitely hardcodes into the template files. But that's never stopped anyone from trying to break it, has it?

The file that controls the list is ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl. In one of my previous posts I've shown how to hide some of the buttons. The modified date is in exactly the same area. The trick would just be finding how Cognos pulls the data for the owner, probably by looking for the logicsheet that controls the properties page, and replacing the modified with it.

I'll see what I can do once I have access to my test installation again.

blom0344

Good to read that you consider this a challenge   :D

I'd consider it a challenge too, but the trick is indeed where to look. I have found the existing documentation delivered by Cognos rather, well, 'lacking'.

CognosPaul

Well, I've poked around a bit.

The file that needs to be modified is indeed ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl

The section that controls it starts at row 3156 (it may be different in yours, search for the phrase "this will give us the time formatted with the java").

You can find the details for generating the owner name in ..\c8\templates\ps\portal\properties_general.xts

The section for the owner starts at row 1421.

I haven't had the chance to modify the files, only to dig through them, but it shouldn't be too difficult to make the changes.

CognosPaul

I was wrong! Apparently ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl goes somewhere else. I can't even figure out where that goes now.

My next bet is ..\c8\templates\ps\portal\cc\gen_page.xslt Lines 366 onwards seem to match the list in the portal. That looks like a good bet on controlling the generation of each row.

Hopefully tomorrow I'll have time to try some more.

CognosPaul

I've decided to post my findings here as a reference. I can't even remember what happened last time I tried to rely on my memory.

Well, gen_page.xslt is definitely the place that controls it.

Changing <xsl:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ),  string( $timeZone ),  string( $contentLocale ) )"/>
to <xsl:value-of select="'test'"/> will put test in each row.

Unfortunately the really obvious <xsl:value-of select="string(cm:owner)"/> doesn't work. I need to figure out which attributes I can use, and how I can link to related fields if I need.

I have no experience with XSL, so this is fun.

blom0344

Hi Paul,

I realized that I never made any reference to why I would want have the owner in the GUI.

We experience xml corruption when we try to locally open RS reports that are checked out of our source control system. (non-ASCII characters disappear from the XML) Because Cognos does not allow native locks on reports from within connection we are trying to avoid overwriting each others work by using VSS as a source control system.

Adding the owner to the GUI at least allows each developer to change the owner , making sure other developers spot it directly from connection.