Printing and page breaks (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


rdouglass -> Printing and page breaks (11/30/2001 20:09:00)

Hi All,<P>Does anyone know how to insert a ' page break' in an asp page?<P>What I' m trying to do is build a results page that shows 13 results per page with a bunch of header info on each page. The submitting form is a dynamicly built form with up to 99 records each with 7 fields. I pass the info to the results page via POST. The printed ouput will fit about 13 per page comfortably. I do know about limiting the records displayed but I don' t want to have to do that ' cause I don' t want those prev-next things to print.<P>Possibly someone knows how to make those things non-printable? Maybe I should build an Excel sheet (or Word doc) and e-mail it? PDF maybe? Any suggestions???




Stuey -> RE: FAQ : Printing and page breaks (11/30/2001 20:07:00)

E-mailing the results is always a nice option, you can then snag the mail address and Keep it for marketting purposes (naughty I know But hey were not here for fun)

Most people create a printer friendly page.

Use javascript to open a new window with a simple txt banner and contact info. and a print button

then the results

have a close button too.

Thats what i would do

T

------------------
Stuart Steele
stuart@stuweb.co.uk
http://www.stuweb.co.uk





rdouglass -> RE: FAQ : Printing and page breaks (11/30/2001 20:26:00)

Thats a nice suggestion, but it doesn't seem to address the problem. Also, the printed page needs to have some formatting, etc. to look correct - they will be reviewed and submitted elsewhere on paper.

I can easily make the results show only 13 records per page or show header, then 13 records, then header, then 13 records, etc. That's not the problem - the problem is to get the page break in there.

I guess I could build an e-mail for each group of (up to) 13 records....it just seems like there should be something better.....

Boy, never any 'cookie cutter' projects...





Spooky -> RE: FAQ : Printing and page breaks (12/1/2001 20:32:00)

Use this code :

<head>
<style>
@page { size: auto; margin: 5%; }
</style>
</head>

Then at the break point :

<p CLASS="page" align="center"> </p>

------------------
§þððk¥
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!
VP-ASP Shopping cart





rdouglass -> RE: FAQ : Printing and page breaks (12/5/2001 15:15:56)

Just an update. Spooky, you definitely bailed me out this time! Thanks millions! (not dollars however )

Did want to post the final code I used for others:

Used this code in the <head> section:

<style>
p.page { page-break-before: always }
</style>

Then whever I wanted the break, I used:

<p CLASS='page' align='center> </p>

 




kevin1000 -> RE: FAQ : Printing and page breaks (12/13/2001 0:26:52)

Spooky,
I understand your last post about the <style> but how do I determine where, in a database result, to put the CLASS part.
I'm responding to this thread cause this is something I've been trying to do also. I have several reports that don't break correctly when printed.

Thanks
Kevin

Kevin




rdouglass -> RE: FAQ : Printing and page breaks (12/13/2001 15:33:08)

If you added the <style> already, you just put this code:

<p CLASS='page' align='center> </p>

Wherever you want the break. When I did it, I basically made sure all my tables were closed, pasted the code, then built the rest of the tables to the next page break, closed the tables, page break, etc.

 




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625