If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

how to lock/freeze the cross tab rows in cognos 8 report studio

Started by srinivaschukka, 19 Nov 2007 04:20:25 AM

Previous topic - Next topic

srinivaschukka

I have to lock/freeze the rows in the crosstab report.

the below is the link where we can get the code/specification for freezing/lock the header of the cross tab. But my requirment is to freeze the rows instead of the columns header( as shown in the attachment file).


http://wiki.ittoolbox.com/index.php/Lock_Header_Row



(

<script type="text/javascript">
var frnEle;

// Function to freeze the headers
function frozenHeaders(divID)
{
   if(document.getElementById(divID) != null)
   {   
      frnEle = document.getElementById(divID);      
      // Lock the frozen headers
      frzn = document.getElementsByName("frozenHeader"); //In IE getElementsByName only works on the document obj, not a node
      for(i = 0; i < frzn.length; i++)
      {
         nd = frzn.parentNode.parentNode;
         nd.style.setExpression('top', 'document.getElementById("' + divID + '").scrollTop');
         nd.style.setAttribute('position', 'relative');
         nd.style.setAttribute('zIndex', '11');
      }
      
      // hook into onresize event listener
      window.onresize = windowResized;
   }
}

//hide scrollbar
//get parent div tag in which Cognos inserts HTML
if (document.getElementById("RVContent"))
{
  var x = document.getElementById("RVContent").parentElement;

  //hide scrollbar
  x.style.overflowY = 'hidden';
  x.style.overflowX = 'hidden';
}

// onWindowResize handler
function windowResized(){
   var newW = document.documentElement.offsetWidth - 24;
   var newH = document.documentElement.offsetHeight - 255;

   frnEle.style.width = newW;
   frnEle.style.height = newH;

   document.getElementById("RVContent").style.width = document.documentElement.offsetWidth - 12;
   document.getElementById("RVContent").style.height = document.documentElement.offsetHeight - 255;
}

</script>

<style>
/* Initially set the div around the table to the appropiate width and height*/
#tbldiv
{
   width: expression(document.documentElement.offsetWidth - 24); /* width minus offset */
   height: expression(document.documentElement.offsetHeight - 255); /* height minus offset */
   overflow: auto;
}

/* Style to make sure the table displays correctly */
#tbldiv table {
   table-layout: auto;
}
</style>
)



please help

Thanks

Srinivas