IBM Support

How to remove the margins in Cognos Viewer

Technote (FAQ)


When viewing a report rendered in HTML in Cognos Viewer, there is a border of 5 pixels to the left and right and 3 pixels at the top. The requirement is to remove this border.


If you view the source of a report displayed in Cognos Viewer, it should contain this HTML instruction...
<body role="application" aria-label="IBM Cognos Viewer" topmargin="3" bottommargin="0" marginheight="3" rightmargin="5" leftmargin="5" marginwidth="3" onclick="if (typeof window.oCV_NS_ != 'undefined'){window.oCV_NS_.rvMainWnd.hideOpenMenus();}" style="overflow:auto" class="viewer">

and it can be seen that the margins are set here.


Edit this file...


where <skin> is the skin that your users use. If they use different skins, then you will need to make this change to the \viewer\RVReport.css files which are used. Also, you will need to remember this change whenever you upgrade your IBM Cognos software.

Modify the following section...

body, textarea, input, select
font-family: Tahoma, arial, geneva, helvetica, sans-serif;

Document information

More support for: Cognos Business Intelligence
Cognos Viewer

Software version: 10.1, 10.1.1, 10.2, 10.2.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1653494

Modified date: 12 September 2014

Translate this page: