Force results to print on separate pages

R

RoadKill

Hello,

I used to have a web form built that the results were emailed to a specific
user and then automatically printed on two separate pages whenever the user
decided to print. It was deleted and can't be recovered so am rebuilding.

I remember it has to be in two separate tables with the second one forcing a
new page but can't remember the code in the Table tag to do that.

Any ideas?

My code is as follows:

<%

Dim HTML
Dim TABLE

TABLE = "<table border=""1"" bordercolor=""#333333"" width=""100%"" >"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <th colspan='2'>New Hire Report</th>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Date Submitted:</b></td><td
width='65%'> " & Request.Form("date") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>New Hire Name:</td><td width='65%'> "
& Request.Form("nhname") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Coach:</b></td><td width='65%'> " &
Request.Form("BankerCoach") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Date of Calls:</b></td><td
width='65%'> " & Request.Form("inputdate") & "</td>"
TABLE = TABLE & " </tr>"

TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>SOJT Phase:</b></td><td width='65%'> "
& Request.Form("sojt") & "</td>"
TABLE = TABLE & " </tr>"

TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Time Spent with New Hire:</b></td><td
width='65%'> " & Request.Form("timespent") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Number of Calls Taken:</b></td><td
width='65%'> " & Request.Form("callstaken") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Referral Attempts:</b></td><td
width='65%'> " & Request.Form("refattempts") & "</td>"
TABLE = TABLE & " </tr>"


TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Virtual Library:</b></td><td
width='65%'> " & Request.Form("VirtualLibrary") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>My Customer:</b></td><td width='65%'>
" & Request.Form("MyCustomer") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>ECPR:</b></td><td width='65%'> " &
Request.Form("ECPR") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Referrals Tracked:</b></td><td
width='65%'> " & Request.Form("ReferralsTracked") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Warm Transfer:</b></td><td
width='65%'> " & Request.Form("WarmTransfer") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " </TABLE>"





TABLE = TABLE = "<table border=""1"" bordercolor=""#333333"" width=""100%"" >"


TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Strengths:</b></td><td width='75%'> "
& Request.Form("pos") & "</td>"
TABLE = TABLE & " </tr>"



TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Opportunities:</b></td><td
width='75%'> " & Request.Form("neg") & "</td>"
TABLE = TABLE & " </tr>"



TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Topics during debriefing:</b></td><td
width='75%'> " & Request.Form("Topics") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " </table>"


HTML = HTML & "<HTML>"
HTML = HTML & "<HEAD>"
HTML = HTML & "<TITLE></TITLE>"
HTML = HTML & "</HEAD>"
HTML = HTML & "<BODY>"
HTML = HTML & TABLE
HTML = HTML & "<br><i><span style=""font-size: 10.0pt; font-family: Arial;
color: blue"">"This message may contain confidential and/or privileged
information. If you are not the addressee or authorized to receive this for
the addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this message in
error, please advise the sender immediately by reply e-mail and delete this
message. Thank you for your cooperation."</span></i></p>"
HTML = HTML & "</BODY>"
HTML = HTML & "</HTML>"

Dim Mail
Set Mail = Server.CreateObject("CDONTS.NewMail")
Dim subjectline
subjectline = "New Hire Report For " & Request.Form("nhname") & " " &
Request.Form("date")
Mail.To= Request.Form("sup") & "; (e-mail address removed)"

Mail.CC = Request.Form("trainer")

Mail.BCC = Request.Form("BankerCoach")

Mail.From = Request.Form("BankerCoach")

Mail.Subject=subjectline

Mail.BodyFormat = 0
Mail.MailFormat = 0

Mail.Body = HTML
Mail.Send
Set Mail=nothing

%>
 
M

Mike Mueller

google page break css

RoadKill said:
Hello,

I used to have a web form built that the results were emailed to a
specific
user and then automatically printed on two separate pages whenever the
user
decided to print. It was deleted and can't be recovered so am rebuilding.

I remember it has to be in two separate tables with the second one forcing
a
new page but can't remember the code in the Table tag to do that.

Any ideas?

My code is as follows:

<%

Dim HTML
Dim TABLE

TABLE = "<table border=""1"" bordercolor=""#333333"" width=""100%"" >"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <th colspan='2'>New Hire Report</th>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Date Submitted:</b></td><td
width='65%'> " & Request.Form("date") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>New Hire Name:</td><td width='65%'> "
& Request.Form("nhname") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Coach:</b></td><td width='65%'> " &
Request.Form("BankerCoach") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Date of Calls:</b></td><td
width='65%'> " & Request.Form("inputdate") & "</td>"
TABLE = TABLE & " </tr>"

TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>SOJT Phase:</b></td><td width='65%'>
"
& Request.Form("sojt") & "</td>"
TABLE = TABLE & " </tr>"

TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Time Spent with New Hire:</b></td><td
width='65%'> " & Request.Form("timespent") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Number of Calls Taken:</b></td><td
width='65%'> " & Request.Form("callstaken") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Referral Attempts:</b></td><td
width='65%'> " & Request.Form("refattempts") & "</td>"
TABLE = TABLE & " </tr>"


TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Virtual Library:</b></td><td
width='65%'> " & Request.Form("VirtualLibrary") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>My Customer:</b></td><td width='65%'>
" & Request.Form("MyCustomer") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>ECPR:</b></td><td width='65%'> " &
Request.Form("ECPR") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Referrals Tracked:</b></td><td
width='65%'> " & Request.Form("ReferralsTracked") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='35%'><b>Warm Transfer:</b></td><td
width='65%'> " & Request.Form("WarmTransfer") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " </TABLE>"





TABLE = TABLE = "<table border=""1"" bordercolor=""#333333""
width=""100%"" >"


TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Strengths:</b></td><td width='75%'> "
& Request.Form("pos") & "</td>"
TABLE = TABLE & " </tr>"



TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Opportunities:</b></td><td
width='75%'> " & Request.Form("neg") & "</td>"
TABLE = TABLE & " </tr>"



TABLE = TABLE & " <tr>"
TABLE = TABLE & " <td width='25%'><b>Topics during debriefing:</b></td><td
width='75%'> " & Request.Form("Topics") & "</td>"
TABLE = TABLE & " </tr>"
TABLE = TABLE & " </table>"


HTML = HTML & "<HTML>"
HTML = HTML & "<HEAD>"
HTML = HTML & "<TITLE></TITLE>"
HTML = HTML & "</HEAD>"
HTML = HTML & "<BODY>"
HTML = HTML & TABLE
HTML = HTML & "<br><i><span style=""font-size: 10.0pt; font-family: Arial;
color: blue"">"This message may contain confidential and/or privileged
information. If you are not the addressee or authorized to receive this
for
the addressee, you must not use, copy, disclose, or take any action based
on
this message or any information herein. If you have received this message
in
error, please advise the sender immediately by reply e-mail and delete
this
message. Thank you for your cooperation."</span></i></p>"
HTML = HTML & "</BODY>"
HTML = HTML & "</HTML>"

Dim Mail
Set Mail = Server.CreateObject("CDONTS.NewMail")
Dim subjectline
subjectline = "New Hire Report For " & Request.Form("nhname") & " " &
Request.Form("date")
Mail.To= Request.Form("sup") & "; (e-mail address removed)"

Mail.CC = Request.Form("trainer")

Mail.BCC = Request.Form("BankerCoach")

Mail.From = Request.Form("BankerCoach")

Mail.Subject=subjectline

Mail.BodyFormat = 0
Mail.MailFormat = 0

Mail.Body = HTML
Mail.Send
Set Mail=nothing

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top