473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Force page break after 40 records



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
4 3462
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


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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
0
by: James | last post by:
We have a page that reads records from a database and displays them. Basically name/address/city/state/zip/county/phone. These records are between 4-6 lines a piece (there are other variables...
2
by: Yogi_Bear_79 | last post by:
I have a script that parses window.location.hash to figure out which xml file to load. The xml files populate a page on a framed site. The code works correctly to a point. If I have a seperate...
8
by: CJM | last post by:
What is the best way to force a page break when printing from a browser? A page in my application generates a series of tables which are usually less than will fit on a page of A4. Ideally I want...
2
by: comp.lang.php | last post by:
class ReportGenerator { function ReportGenerator() {} /** * Generate the HTTP headers necessary for this file type. Can be called statically *
1
by: Erik K. Schindeldecker | last post by:
Good Afternoon, I am exporting a series of datagrids to Microsoft Word, and cannot figure out how to force a page break between each datagrid. Does anyone know of a character or command I could...
7
by: ckpoll2 | last post by:
Hello, I have a report that returns a varying number of dollar amounts, depending on the date criteria that is entered. What I need to do is force a page break after 32 records and sum those 32. ...
1
by: cheyennemtnman | last post by:
In MS Access how can I skip to the next page on section break if section can not be printed entirely on the preceding page. Say if I had 20 print lines on the page and I have section 1 with 4...
0
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.