Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting Page break within a table to add column headers

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
How to write code that would be used when a page break happens : like adding column headers to tables each time a page break happens.

'Style:page-break-after:always' enables to add column headers only to a new table after a page-break but not when a page break happens within a table (because the table is longer than a single page height...°

Also is there any way to prevent the page break to happen in the middle of a table line ??

Thanks

François
 
delorfra,
i had to do this once, but had the use of coldfusion to help.

Basically what i would do is write the table itself dynamically with a count...so your script would know how many rows / columns before creating the next one.

I would do this with javascript.

If you need more description, let me know ;) ~ jsLove ;)
 
My table is generated with ASP/ADO but there is no typical line height as some cells are filled with huge chunks of text (actions taken ..). So I cannot know exactly from the number of lines the moment the page breaks might happen or should happen if I was to trigger them by creating a new table and using 'style:page-break-after:always'.

Thanks anyway
 
Hi,

I'm not sure what you mean, do you want to limit the height or the width of the table? and height/width are you hoping for. I had a similar problem (on a asp page build from a database), I wanted to keep the table 2 columns wide. So, if you give me more detail, I might be able to help you.

Salut.
 
delorfra,

dont know what to tell ya, never been able to actually "split" a table in half...just write it dynamically a bit at a time to it fits the window...sorry.

good luck though! ~ jsLove ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top