By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,463 Members | 2,954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,463 IT Pros & Developers. It's quick & easy.

Force page break after 40 records

P: n/a


Hello there,

I've created a report from a SQL table that has a minimum of 150
records. I need a printer friendly version and with straight html I use
this code:
<p style="page-break-after: always">

but I don't quite know how to code this into my data driven report for
every 40 records or so.

I'm using this for my loop:

do while not rs.eof
response.write "<tr><td>" & rs("item")
rs.movenext
loop

Any help or other suggestions would be appreciated. Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Dim iCount

do while not rs.eof
if iCount = 40 then
response.write vbcrlf & "<tr><td>" & rs("item")
iCount = 0 '// Reset it to 0 for the next 40
else
response.write "<tr><td>" & rs("item")
end if
iCount = iCount + 1
rs.movenext
loop
--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Mel Draper <me******@clickfocal.com> wrote in message
news:u9**************@tk2msftngp13.phx.gbl...


Hello there,

I've created a report from a SQL table that has a minimum of 150
records. I need a printer friendly version and with straight html I use
this code:
<p style="page-break-after: always">

but I don't quite know how to code this into my data driven report for
every 40 records or so.

I'm using this for my loop:

do while not rs.eof
response.write "<tr><td>" & rs("item")
rs.movenext
loop

Any help or other suggestions would be appreciated. Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

P: n/a


Well, thank YOU very much!! Works like a charm.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

P: n/a
Your welcome.......

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Mel Draper <me******@clickfocal.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...


Well, thank YOU very much!! Works like a charm.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4

P: n/a
On Sun, 28 Mar 2004 12:49:42 -0800, Mel Draper
<me******@clickfocal.com> wrote:
I've created a report from a SQL table that has a minimum of 150
records. I need a printer friendly version and with straight html I use
this code:
<p style="page-break-after: always">

but I don't quite know how to code this into my data driven report for
every 40 records or so.

I'm using this for my loop:

do while not rs.eof
response.write "<tr><td>" & rs("item")
rs.movenext
loop

Any help or other suggestions would be appreciated. Thanks.


Steven's solution works great, but you may want to look at using CSS
to define print styles as well. A CSS group can give you pointers.

Jeff
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.