Saturday 17 August 2013

Hiding Header and Toolbar in Cognos 10 Viewer


By default the Cognos Header and toolbar will be visible in Cognos Report Viewer. Sometimes users of Cognos reports may request to hide header and toolbar in the Cognos viewer. If the report is called from an external application, user might want to hide the Cognos header and toolbar in that application.
In Report Viewer the Cognos Header and toolbar can be hidden from users by calling the report through a URL and passing the correct parameters.  We can hide only the Header, only the Toolbar or both. This article demonstrates how to hide Header and toolbar.

Hiding Header

To hide header just embed the following in the URL:
&cv.header=false

Following URL will hide the Cognos Viewer Header:

http://PC-SUMEET:9300/p2pd/servlet/dispatch?b_action=cognosViewer&ui.action=run&ui.object =%2fcontent%2ffolder%5b%40name%3d%27Test_Sum%27%5d%2freport%5b%40name%3d%273D_Chart %27%5d&ui.name=3D_Chart&run.outputFormat=&run.prompt=true&cv.header=false

 Hiding Toolbar

To hide toolbar just embed the following in the URL:

&cv.toolbar=false

For example, if the report URL is

http://PC-SUMEET:9300/p2pd/servlet/dispatch?b_action=cognosViewer&ui.action=run&ui.object =%2fcontent%2ffolder%5b%40name%3d%27Test_Sum%27%5d%2freport%5b%40name%3d%273D_Ch art%27%5d&ui.name=3D_Chart&run.outputFormat=&run.prompt=true

Following URL will hide the Cognos Viewer Toolbar:

http://PC-SUMEET:9300/p2pd/servlet/dispatch?b_action=cognosViewer&ui.action=run&ui.object =%2fcontent%2ffolder%5b%40name%3d%27Test_Sum%27%5d%2freport%5b%40name%3d%273D_Chart %27%5d&ui.name=3D_Chart&run.outputFormat=&run.prompt=true&cv.toolbar=false


Hiding Header and Toolbar

To hide both header and toolbar use the following URL:

http://PC-SUMEET:9300/p2pd/servlet/dispatch?b_action=cognosViewer&ui.action=run&ui.object =%2fcontent%2ffolder%5b%40name%3d%27Test_Sum%27%5d%2freport%5b%40name%3d%273D_Chart %27%5d&ui.name=3D_Chart&run.outputFormat=&run.prompt=true&cv.header=false&cv.toolbar=false



4 comments:

  1. Hi,

    Thank you for the information.
    Iis there any way to hide the tool bar when the user run the report from cognos connection or report studio?

    Thanks

    ReplyDelete
    Replies
    1. Yes we can do this by modifying cognos xml files like system.xml

      Delete
  2. Plz give some more details

    ReplyDelete
    Replies
    1. There are several xml files which needs to be modified. I will share this in details in my coming post. keep watching.

      Delete