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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page break

Status
Not open for further replies.

aprilcrystal

Programmer
Mar 5, 2002
3
AU
Is it possible to force a page break when printing? Any script will do (doesn't matter if it is Java or VB)

Thanks.
 
Define a CSS style for a TD or DIV or SPAN like this:

<style>
.PageBreak {
page-break-after : always;
}
</style>

then use it in your code.
E.g.:

<%
While Not rs.EOF Then
Response.Write <tr><td>blah, blah</td></tr>
nRow = nRow + 1
If nRow = 10 Then
Response.Write &quot;<tr><td class='PageBreak'>page break</td></tr>&quot;
nRow = 1
End If
rs.MoveNext
Wend
%>


Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top