Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Page Breaks to ASP/SQL Mailing Labels!!!

Status
Not open for further replies.

Rexolio

Technical User
Aug 29, 2001
230
I'm trying to create online mailing labels via ASP with info pulled from a SQL database. I can get it lined up okay in IE, but not Netscape or AOL using the same template. But even I create 3 different templates for each browser type, they eventually get cut off by the printer. Found an article in 4GuysFromRolla.com about create Printer line breaks, but can't get it to work. It adds to the confusion because I'm fairly unfamiliar with the script that I have which makes the looped info go 3 columns across and then start a new row. Here is what I have:

<table border=&quot;0&quot; width=&quot;775&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<%
i = 1
do until rsResults.eof
cellString = &quot;<td width='260'>&quot; & rsResults(&quot;FirstName&quot;) & &quot; &quot; & rsResults(&quot;LastName&quot;) & &quot;</font></td>&quot;

if not i mod 3 = 0 then
response.write(cellString)
else
response.write(cellString)%></tr><tr>
<%
end if

i = i + 1
rsResults.movenext
loop
%>
</tr>
</table>
<%
end if
rsResults.close
%>

Here is what I found:

<HEAD>
<STYLE>
H3 { page-break-before: always }
</STYLE>
</HEAD>

<%
For i = 0 To UBound(myArray)
Response.write &quot;<IMG Src='&quot; & myArray(i) & &quot;'><BR>&quot;
If i % 4 = 0 Then
' If i is evenly divisible by 4, meaning every
' 4th image, we want to insert a page break
Response.write &quot;<H3>Start the next page</H3>&quot;
End If
Next
%>

Any tips on putting this together or suggestions on another way. And I'd rather not have to use <H3></H3> tags on top o fit all! Sorry to put such a long message in here, but I'm totally desparate!!! %-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top