Solved

page break keeps printing blank page

Posted on 2006-06-22
6
417 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
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:kelvinwkw
Comment Utility
what if you set it to auto ?

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

Author Comment

by:FSIFM
Comment Utility
I tried this as I thought that would resolve it but I still got the blank page printed at the end.
0
 
LVL 11

Expert Comment

by:kelvinwkw
Comment Utility
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Author Comment

by:FSIFM
Comment Utility
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
Comment Utility
can you show me the code?
0
 
LVL 6

Accepted Solution

by:
davecestria earned 250 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now