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

Unusual Page Break... please help

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
I have a certain number of records that I loop to get all of the results. when I print these however there are large gaps inbetween if I use page breaks. Therefore, I used a counter to count after how many records to add the page break. Is there an easier way than this to do it?

My code is below. i cannot think of any other way to do it!!!! Thanks for listening

<HEADER>
<style>
P.breakhere {page-break-before: always}
</style>
</HEADER>

...the DB connection string & SQL is here...

<BODY>

<%
do until rs.EOF
%>

... the records along with the counter
<%counter=counter+1%>...

<%
if counter =5 then
%>
<P CLASS=&quot;breakhere&quot;></p>
<%end if%>
<%
if counter =11 then
%>
<P CLASS=&quot;breakhere&quot;></p>
<%end if%>

...and this 'if counter =' continues for all of the records so that they look alright on the page...

<%
rs.MoveNext
loop
%>

</BODY>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top