Focal Point
How to keep the column headers fixed?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4811098331

August 23, 2005, 12:59 PM
<Prasad>
How to keep the column headers fixed?
I have a screen created in report layout editor which has four reports(two of them are by and cross reports). Presently the column headers in the reports are scrolling whenever there is more data. Is there a way to fix the column headers and make only the data to scroll?
August 23, 2005, 02:03 PM
Kamesh
can you post some example?
August 23, 2005, 02:45 PM
<Prasad>
I will send some screen shots. Please send your email addess by sending a mail to prasad.emani@fmr.com
August 23, 2005, 02:51 PM
Tony A
I take it that you mean HTML output? If so there are many forums out there that have discussed this very subject and virtually all agree that it's difficult but not impossible. It just depends upon experience, ability and the target browser (e.g is it just I.E., Firefox, Netscape or all of them?).

Have a look at this forum for a small insight.

Remember peeps, when using other components with WebFOCUS do not forget the other forum communities out there that could provide you with valuable insights. Look at the broader picture Smiler
August 23, 2005, 03:28 PM
Boogarweed
We have done this in many of our self service reports. It is a very manual process. We build a static HTML page with the header information in it and use CSS to control the width of each column header. Then we create the report without column headings and use CSS to give the columns the exact same size as the column headers in the HTML page we created before. Then we place the HTML header page in a small frame at the top of a parent HTML page and the report in the bottom frame. Then the data will scroll under the header while the header remains fixed. Now it's hard to build but it's REALLY HARD TO MAINTAIN!! Sorry, I had to vent a little. We are in the process of converting all of the reports we did this way back to a more maintainable format. I wouldn't do it this way again myself.....Kelly
August 23, 2005, 05:48 PM
Kamesh
Try,

ON TABLE SET LINES n

it will work only in HTML
August 23, 2005, 06:38 PM
susannah
-*a q&d way to FIX HEADERS
-* this was someone else's suggestion, but i can't remember who, so thank you to that person anyway.
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr><th width="100">Name</th>
<th width="100">City</th>
<th width="100">Sales1</th>
<th width="100">Sales2</th></tr>
</table>
<div style="overflow:auto;width:400px; height:350px; table-layout:fixed;">
!IBI.FIL.HOLDSOMETHING;
</div>
August 24, 2005, 01:53 PM
Tony A
An example from the CAR file with both horizontal and vertical data scrolling
but fixed headers. As has
been said, it is
fairly manual and intensive,
but that said, it can be done
-* 
File fixedscroll.fex<br />
DEFINE FILE CAR O_TR/A4 = '<TR>';
C_TR/A5 = '</TR>';
  O_TD/A4 = '<TD>';
C_TD/A5 = '</TD>';
END
TABLE FILE CAR<br />SUM O_TD AS ''   
DCOST AS C_TD AS ''O_TD AS 
RCOST AS ''C_TD AS 
 C_TR AS ''BY O_TD AS ''
BY COUNTRY AS '' BY C_TD AS '' 
BY O_TD AS '' >BY CAR AS '' 
BY C_TD AS '' BY O_TD AS '' 
BY MODEL AS ''<br />BY C_TD AS '' 
ON TABLE HOLD AS SRCDATA FORMAT 
ALPHA<br />END
-RUN -*HTMLFORM SRCDATA
-*EXIT-HTMLFORM BEGIN<meta name="handheldfriendly" 
content="true">
<br /><meta name="palmcomputingplatform" content="true"> <title>FOCUS Report 
td {width:120} function sync() document.all("dvdata").scrollLeft 
document.all
("dvHeader").style.width=800+lft
document.all("dvHeader").style.
left= -lft<br  
<table border cellpadding=1>
<td colspan=9><br /><div id="dvheader" style="position:absolute; left:0; 
top:0;  height:300; width:800; 
overflow:hidden"> <table border=1 
bgcolor=cyan width=1000 id="tblheader" 
cellpadding=0 width="100%"> 
<td valign=bottom>
Country of Origin
valign=bottom> Manufacturer 
valign=bottom> 
Model
valign=bottom>
Dealer Cost</td>
valign=bottom>
<br />Retail Cost
</table></div><br />
<div id="dvdata" 
style="position:absolute; left:0; top:30;height:200;
width:800;overflow:auto" onscroll="sync()"><table  
border=1 
width=1000 name="tbldata" id="tbldata"cellpadding=0 width="100%">
!IBI.FIL.SRCDATA;
-HTMLFORM END

This message has been edited. Last edited by: <Mabel>,
August 24, 2005, 03:06 PM
Francis Mariani
Very nice, Tony.