How-To: Disable buttons in Cognos 8.4 Report Studio report header

Sometimes it is very handy not to see the portal header (all the buttons, such as Run Report, open in Report Studio etc. and the user name, Log Off stuff) when running a Cognos report. This is especially handy when you are trying to include a Cognos report in another external application.

The basic solution would be to alter the CSS of the items we want to hide and set their display property to none.

The items in question are Header1 and Header3 in this case.

We will be adding the additional CSS elements into an 'HTML Item' which you should insert as the first thing in the Report Studio report. Afterwards, double-click the newly created HTML Item and copy the following CSS code into it:
<style>
.mainHeader1 {
    display: none;
}

.mainViewerHeader3 {
    display: none;
}
</style>


This will hide all of the header items.

You can disable just one of the headers at a time. Header 3 being the button group and Header 1 being the top part with the user ID stuff.

I am not 100% sure if this is valid for other versions of Cognos, that is why I mention 8.4 in the title (8.4.1 to be exact...). Sorry, but I have no way to try it out on another version at the moment. If you have the possibility, drop in a comment about his.

In any case, now when you run this (8.4) report within another application there will be no trace of it being a Cognos based report! Any other good reason to completely remove the headers from reports?

No comments:

Post a Comment