Forum Moderators: open

Message Too Old, No Replies

Print and header problem

more than one page and a common header

         

siemakuba

3:10 pm on Oct 1, 2003 (gmt 0)

10+ Year Member



HI, the problem is that I need to do prepare a page for printing. There would be much more data than one page and i need the same header to be included on all of the pages.

The data would be taken from a database, and would be formatted as <tr><td>data</td></tr>. The problem is that i have no idea after which <tr></tr> the page would break, but the header needs to be the same.

On some other forum i found a solution :
<table>
<thead>
<tr><td></td></tr>
</thead>
<tbody>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
</tbody>

it said that it would ad the content included in the <thead> section every new page printed, but it didn`t work ...

i`ll appreciate any suggestions.

thanks in advance,
bye

Kuba L.

Sinner_G

3:16 pm on Oct 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you also have a <tfoot> tag? AFAIK, it only works when all three are present.

tedster

3:24 pm on Oct 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're right, Sinner_G, and contrary to what you expect intuitively, tfoot must come BEFORE tbody. However, you can leave it blank.

W3Schools Reference [w3schools.com]

siemakuba

7:19 am on Oct 2, 2003 (gmt 0)

10+ Year Member



hi there,

yes i have all three of them : <thead> than <tfoot> at at last the <tbody> tags - that does not work ...

i notcied that i didn`t have the DTD declared - after declaring it nothing changed ...

any more ideas?

Sinner_G

7:35 am on Oct 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



any more ideas?

What browser are you testing with? Netscape supports this feature only as of NN6, not sure about Opera.

Have you tried filling the table with static content instead of database? Does it work if you do that?

siemakuba

7:54 am on Oct 2, 2003 (gmt 0)

10+ Year Member



i`m testing this with IE 6.0 and IE is the one that MUST do it properly :) if NN wouldn`t - that`s not a big problem.

BUT

if i took a static content, NN 7.1 did it as it should be done - added a header (the one in <thead>) to every new printed page. IE still does not do it. And of course when the content is taken form a database - it does not work at all.

greets