Business Intelligence Cognos Report Studio

How to freeze column headers in the Cognos report

HowTo-Cognos-Report-FreezeColumnHeaders
Written by Logan
Launch Cognos Report Studio, follow the steps below:

STEP 1:
With dragging from TOOLBOX PANEL;

Add two blocks on a blank report page. (1)
Add a list on the lower block (2)
Add HTML Item on the top block (3)

CognosReportStudio-Freezing-Column-Headers-Create

STEP 2:
SOURCE PANEL:  Bring the data items with dragging from the existing package into the list.

STEP 3:
PROPERTIES PANEL:

  • Select the block and go to Properties panel;
  • Set the Positioning – Size & Overflow as certain height and select “Use scrollbars only when necessary”

Block-Properties-Set-Positioning-SizeOverflow
STEP 4:
Enter the following code into HTML Item;

<style type=”text/css”>
.ls{font-size:8pt; }
.lt{ position:relative; top:expression(parentNode.parentNode.parentNode.parentNode.scrollTop-1);  }
</style>

HTML-item-code-freeze

Now you can save and test the report.

About the author

Logan

Logan Kaptan | Business Intelligence Analyst / Cognos Support ,

Pixel Bender, Web Ninja, Web&Graphic Artist, and Creative Mind who is based in Florida