Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2008, 10:31 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default Page breaks in a table


Chaps,

This problem has been eluding me for a while and wondered if any of you guys have found a workable solution.

I have a results table which can overlap into several pages which cuts the table between the pages.

What i am trying to find with no luck is a way of using a page break which closes and opens the the table correctly in the next page.

The tables are created with standard for loops and wondering if in the loop i can add an if statement that can check if at end of page add page break ect.

I am happy to give an example of the table creation if this would help.

Cheers

Aspless


 
Old January 16th, 2008, 06:11 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

In relation to what, printing?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old January 17th, 2008, 04:46 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

My apologies Mat,

Yes in regards to printing.

I have used CSS to set the page break on static pages eg

Code:
<style>
.break { page-break-before: always; }
</style>
<table class="break"><table>
But need to find a way of adding a page break with in the For loop so that the results table is not cut at the bottom of the first page and at the top of the second for instance.

If you have any ideas that would be superb.

Cheers

Aspless



 
Old January 17th, 2008, 06:25 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I suspected so. If I put a page together where I know printing will be a problen in this fashion I desing the table with this in mind - IMO depending on the table design there is no problem with the table having breaks for printing.

I impliment breaks a little differently. you place the instruction in the table tag, I tend to us this style:

br.newpage{page-break-before:always;}

And place it in a td like so:

<Td><BR class="newpage"></td>

Not a solution to your question however another way to do the same thing, does this change things? A CSS expert may have better input for you

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old January 18th, 2008, 01:39 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default

Cheers Matt,

That must be the Auzi way lol ..

Yes a more elegant css approach than my draconian solution.

I'll have a browse of CSS specific pages to see if i can find a solution to my table breaking issue.

Cheers

Aspless








Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Breaks bcogney XML 10 March 29th, 2007 04:01 PM
Page breaks rupen HTML Code Clinic 1 October 4th, 2006 04:08 PM
Page Breaks in ASP askenkray SQL Server ASP 7 September 14th, 2006 02:03 AM
Tables and Page Breaks MER78 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 12th, 2004 12:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.