Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

page break keeps printing blank page

Posted on 2006-06-22
6
Medium Priority
?
426 Views
Last Modified: 2008-02-01
Hi all,

I have a web page that goes through a loop and prints a job card to the web page, then the client clicks the print button to print the job card for the resources.

Problem:
After every job card I have <p style="page-break-after: always"> to insert a page-break so they all print on a seperate pages.  

This works great until the last page where it then prints out a blank page.
As the client prints out around 100 single job cards and 25 batched job cards a day the client will have approx 125 a day (over 3000 a month) blank pages.

can anyone please help on how I can prevent the last page from printing.

Thanks

FSIFM


0
Comment
Question by:FSIFM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16958370
what if you set it to auto ?

<p style="page-break-after: auto">
0
 
LVL 4

Author Comment

by:FSIFM
ID: 16958374
I tried this as I thought that would resolve it but I still got the blank page printed at the end.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Author Comment

by:FSIFM
ID: 16958462
This is what I have done.

I have put the Page break after the </table> but as it is in loop it puts one after every </table> even the last one of which i dont want it to do.
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 16958478
can you show me the code?
0
 
LVL 6

Accepted Solution

by:
davecestria earned 1000 total points
ID: 16959229
why dont you do a loop through the records then if the current record is the last one do not insert pagebreak

example

<%
i = 1

do while not rs.eof
'do your stuff

if i < rs.recordcount then
response.write "<p style=""page-break-after: always"">"
end if

rs.movenext
loop
%>

Hope this helps, untested but looks ok
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question