Click to See Complete Forum and Search --> : Looping tables


leeny
05-09-2005, 02:20 AM
Is there a way to return my search results in 2 pages or more for visibility in printing? Currently my search results are displayed in a table. User is able to view it on screen, no problem.. but when they want to print it, the rest of the table is being cut off.

So i was wondering if i can include anything in my loop to start a new table when the search results exceeds three.

I've attached my files with this post, feel free to take a look to gain a better understanding on what I'm driving at. Thanks in advance.

To try the application, follow this instructions:

URL : http://localhost/Nantongpolymers_new/New Folder/try.asp

1st page: Select DENSITY, TENSILE STRENGTH & FLEXURAL STRENGTH

2nd page:
1)Select GREATER OR EQUALS to 1.15 for DENSITY,
2)Select SMALLER OR EQUALS to 100
3)Select GREATER OR EQUALS to 90

3rd page: Search results.

Please try and assist me in the looping. thanks a million.

CardboardHammer
05-09-2005, 11:20 AM
I think a quick and dirty fix would be to make each row a separate table, though you'd need fixed column widths for it not to look like ass. When it runs out of space for more rows/tables on a page, you'll get a pagebreak and it'll continue on the next page. You could also group a few rows per table instead of 1 row per table, to save a bit on overhead, but the more rows per table, the more risk of wasted space per printed page.

leeny
05-09-2005, 09:38 PM
can u tell me how to go about doing tht? just a simple example will do. i'm very new in ASP so am very lost.

wmif
05-10-2005, 03:54 PM
if the heights of the rows are fixed then you can just count the number that are printing, then start a new table after that.

do until rs.eof
<table>
for i = 0 to 15
<tr><td> data </td></tr>
next
</table>
loop