Quick and painless way of accessing users’ folders

As part of my administrative duties for my various clients, I periodically trawl through the logs. Many times I’ll want to see exactly what the users are doing in the reports on my server. It becomes a headache when these reports are in the users’ “My Folders”. I need to go into the administration page, find the user, go into their “My Folders”, copy out the report, paste it into mine then run it. It’s a mess and I’m far too lazy for that.

Fortunately Cognos allows us to access objects through URL parameters. On my laptop, I’m using OpenDJ as my authentication provider, so the CAMID is slightly different than Active Directory. My CAMID here is CAMID(“OpenDJ:u:cn=administrator”). In AD, it might be CAMID(“AD:u:r7a1n7d8o8m3l1e4t9t2e2r4s01234567)

My user

I can just copy that CAMID and paste it into the URL as:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=CAMID(“OpenDJ:u:cn=administrator”)

2. Accessing my user

Obviously this is still predicated on the security in place. A user who doesn’t have permission to access another user’s folder will get an “Access Denied”

3. Thwarted again

UPDATE!
In the comments below, Ryan shared that a users’ folders can be accessed directly with the username:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=//account[@userName=’john.doe’]/folder[@name=’My Folders’]

Content Manager Memory Leaks-Guest Post

 

Some time ago Paul and I were working together as Cognos Infrastructure specialists for a certain company. During that time, one day the Cognos development environment became unstable, and we were struggling to get it up and running again.

After the day’s events I wrote an email explaining these events to the company’s developers. At Paul’s request I am publishing the main points from this email here. I think they can be educating for a particular sort of Cognos instability, often seen in dev environments.

Mostly, I’m talking about crfashes which are a result of Cognos’ Content Manager reaching maximum memory, and then shutting down. Without the CM there can be no authentication, without authentication there’s no navigation. Also, when a server reaches maximum available memory, it will become slow and non-responsive.

 There are several reasons why a CM Server would max out on memory. One of them is a bug in Cognos 10.1.1 to be fixed in the nearest fix pack (This is really a Java bug, and the JRE was updated in FP1). This bug causes a “Java.Lang.OutOfMemory” error on login. It’s a slow, steady memory leak that breaks out every now and again.

Another well documented reason for a CM server to crash and burn for lack of memory is when requests are piled up in the memory faster than the memory cleans itself. Imagine the following scenario: A report executes the same query 50 times. The query has an error, so the error is written to the log and also to the audit database. The CM is in charge of Audit, so the CM gets 50 requests for Audit update in less than a minute from this report. The CM keeps all these requests in memory, where they are kept not until they are performed, but until the memory is cleaned. This behavior is a result of the requests being stored the Cognos Java process, which is only cleaned once every n minutes.

Now, the developer running the report gets an error or false data, makes a slight change and runs it again. And so on.

If the CM’s memory get filled before a cleanup is made, the CM will max out and will pretty much play dead.

It is very difficult to say, just by analyzing Cognos’ logs, which report or group of reports are responsible for this. If you work with a few developers, it’s not tough to cooperate with them to find the culprits. But the case may be that you’re working with dozens of developers, some not even on site. However, not all hope is lost. You can scan the logs looking for reports that were run over and over and resulted in errors to the logs. To verify, try hiding suspected reports via security, and see what happens. If this works, you’ll have to have a talking-to with the report’s developer. Luckily, since you hid their reports, they are likely to contact you, so you don’t have to search for them.

And as for developers, as a general rule, if an environment is unstable and you are running reports that have been recently developed or that get stuck whenever you run them or that return error messages, the two things may be connected. Your report might, unintentionally, be causing the instability. Alert whoever it is you need to alert.

 

The author, Nimrod Avissar, is a Cognos Architect and Cognos Team Leader at Data-Mine Israel. 

 

Changing Report Studio defaults

Report Studio has a number of annoying default settings, using legacy charts instead of the new and improved ones. While RS should save your settings in a cookie, in my experience it doesn’t always remember them. So instead of constantly changing the settings, I find it easier to change the XML sheet controlling the defaults.

Open ..webcontent\pat\profiles\profile_professional.xml

The file is unfortunately sparse. Most of the settings I change don’t appear. Fortunately, we can guess at them.

Unsetting the legacy charts is easy:

<setting name="UseLegacyCharting" defaultValue="false"/>

When working with dimensional data, Cognos has a nasty habit of aliasing MUNs. You drag a MUN into an exxpression and instead of showing you the full value ([Cube].[Dim].[Hier].[Level]->[all].[whatever]) it aliases it to [whatever] and creates a new data item on the report. To turn that off add the following line:

<setting name="AliasMUNs" defaultValue="false"/>

Also when working with dimensional data, if you drag in a member, or level or a set, it will create what’s called an “extended data item”. Once it’s created, you can’t modify it. To disable that behaviour on an existing report go to File->Report Properties-> uncheck Always create extended data items. Add the following line to disable it by default.

<setting name="CreateExtendedDataItemsForNewReports" defaultValue="false"/>

Animated windows annoy me as I’m often connecting remotely to help developers:

<setting name="EnableAnimation" defaultValue="false"/>

While I like the new charts, the preview is annoying:

<setting name="DisableDesignViewChartPreview" defaultValue="false"/>

The following settings are normally hidden. They may be hidden for a reason, but I use them constantly and have never had a problem. Maybe they’re features in development?

Another annoyance is the calculated member classes. When a query expression item is dragged into a crosstab, the node uses the class Crosstab member cell (calculated).

<setting name="UseCalculatedMemberClasses" defaultValue="false"/>

When building reports I occasionally need to switch between Page Design and Page Structure. Having to click on View then “Page Structure” takes too long; wouldn’t it be easier if there were buttons on the toolbar like the following:

<setting name="ShowViewButtons" defaultValue="true"/>

Do you use table styles? Do you ever wish you could apply the styles to crosstabs?

<setting name="ShowCrosstabTableStyleOptions" defaultValue="true"/>

The next one isn’t incredibly useful, but nice if you like seeing icons in the property sheet:

<setting name="showLabelSmallIcons" defaultValue="true"/>

Forget the tiny icons, do you ever wish you could have the Business Insight style propertysheet in Report Studio?

<setting name="UsePropertySheet2" defaultValue="true"/>

As always, whenever modifying any Cognos internal file, make sure to back up the original file. You will need to delete your temporary files (remember to uncheck “Preserve Favorites website data”) before these take effect.