Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

add space between each order on data table

0 views
Skip to first unread message

bob lin

unread,
Apr 21, 2003, 1:59:01 PM4/21/03
to
I have a web delievery page
(http://www25.brinkster.com/chicagotech/delivery.asp) and data are based on
MS Access (see below for details). It works but I want to add a space
between each Order. How can I do this?


sql = "SELECT * FROM vendor WHERE username = '" & username & "' and password
= '" & password & "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
If Not rs.eof Then
'Response.Redirect "vendors.asp"

%>
<% rem to show table title which uses company name. %>

<TABLE BORDER=1 BGCOLOR=#ffffff CELLSPACING=0><CAPTION><B><%=(rs("Vendor
Name"))%></B></CAPTION>
<TR>
<TH>P/O Number</TH>
<TH>Item Number</TH>
<TH>Item Description</TH>
<TH>Required Date</TH>
<TH>Qty</TH>
</TR>

<%
rs.MoveFirst
do while Not rs.eof
%>
<TR valign="top">
<TD><%=rs("P/O Number")%><BR></TD>
<TD><%=rs("Item Number")%><BR></TD>
<TD><%=rs("Item Description")%><BR></TD>
<TD><%=rs("Required Date")%><BR></TD>
<TD><%=rs("Qty")%><BR></TD>
</TR>


Jack Brewster

unread,
Apr 21, 2003, 2:13:27 PM4/21/03
to
Bob,

Not sure what you're asking for. Do you mean you want a blank line/row
between each ordered item?

I can't view your page as it's hosted on a free pages server and my
company's content filtering blocks it. :)

One quick and dirty way may be to add an extra <br> after the Qty line.
Otherwise, you've got to modify your output code to add an empty row after
each item, but not if it's the last one, etc. The hanging <br> may look
funny on the last item, but if you turn off your table border it wouldn't be
visible.

If this doesn't do what you want, maybe you can clarify the question a bit?

Good luck,

Jack

"bob lin" <bobl...@yahoo.com> wrote in message
news:u#KAa#CCDHA...@TK2MSFTNGP10.phx.gbl...

xmas

unread,
Apr 21, 2003, 3:03:03 PM4/21/03
to
Hi Bob,

In the results table add a row...
Remove any columns lines so the row is the full width
of the table and insert a horizontal line in that row...
(make the row height to suit your needs... )

Hope this helps (couldn't log in for the page to see)

xmas
www.xmas-i-am.com
===================


"bob lin" <bobl...@yahoo.com> wrote in message
news:u#KAa#CCDHA...@TK2MSFTNGP10.phx.gbl...

bob lin

unread,
Apr 21, 2003, 3:24:31 PM4/21/03
to
Jack,

Thank you for help. Sorry for the confusion. I wand a blank line/row between
each ordered item. You did answer my question and I like the simple way. But
when I add <br> test</br> after the QTY line (like this <TH>Qty</TH>
<br> TEST</br>), the TEST shows before the table (no in the between each
order item.). Any further suggestions?

Bob


"Jack Brewster" <rep...@thenewsgroup.please> wrote in message
news:eLYJ2GDC...@TK2MSFTNGP10.phx.gbl...

Jack Brewster

unread,
Apr 21, 2003, 3:34:18 PM4/21/03
to
Bob,

I guess I wasn't clear, either. :)

I meant add an extra within the existing cell, like so:


<TD><%=rs("Required Date")%><BR></TD>

<TD><%=rs("Qty")%><BR><br></TD> <-- ADD IT HERE
</TR>

xmas' suggestion of adding a row may be a better approach. The extra <br>
is really more of a hack. If you do add the extra row, be sure to give it a
'space' because some browsers will collapse empty rows.
<tr><td>&nbsp;</td></tr>

Jack

"bob lin" <bobl...@yahoo.com> wrote in message

news:ORDxMuDC...@TK2MSFTNGP12.phx.gbl...

bob lin

unread,
Apr 21, 2003, 4:13:45 PM4/21/03
to
Thank you for help.

The try this one: http://www25.brinkster.com/chicagotech/password.asp and
the logon id /password are client1/pw1 and vendor1/pw2.

Could you be more specification? How can I remove columns lines? I tried to
add one more row , it works base on each item/delivery not order. For
example, If the order have two deliveries, there is one blank row between
these deliveries. What I want to is the black row between each order. For
example, if I have two orders, the table shows a blank row between these two
orders. Any further suggestions?

bob

"xmas" <xmas@xmas-i-am No Spam.com> wrote in message
news:O6xucjDC...@TK2MSFTNGP10.phx.gbl...

bob lin

unread,
Apr 21, 2003, 4:23:04 PM4/21/03
to
Jack,

Forgot to mention. I did tried this ( <TD><%=rs("Qty")%><BR><br></TD>) too.
It adds a break between each item/delivery but not order. For example, if I
have two orders and each order have two deliveries. After adding <br>, it
will add 4 breaks. What I want to is just two (it is better one) breaks
between two orders. please also refer to my reply to xmas. Any further
suggestions?

Thanks again.

bob


"Jack Brewster" <rep...@thenewsgroup.please> wrote in message

news:OYGhB0DC...@TK2MSFTNGP10.phx.gbl...

Jack Brewster

unread,
Apr 21, 2003, 6:46:03 PM4/21/03
to
Bob,

This assumes that "Required Date" is a valid field to separate orders on.
If not, you'll need to substitute the correct field and maybe update your
query.

Basically you just add an IF statement that checks to see if the current
record's date (or order # or whatever is appropriate) is different than the
previous one. If so, add a blank row (the colspan="5" is what xmas was
talking about) with a background color of black. It then changes the
lastorderdate variable so the next record will match it and not write out a
blank row until the next time the dates don't match.

Keep in mind that I don't have ASP syntax memorized and this code will
probably fail as-is. But it should put you in the ballpark.

Jack

+++

<%
Dim lastorderdate
lastorderdate = ""

rs.MoveFirst
If ((lastorderdate <> rs("Required Date")) AND (lastorderdate <> "")) Then
' Change lastorderdate to the new date
lastorderdate = rs("Required Date")

' Write out blank row
%>
<tr><td colspan="5" bgcolor=#000000">&nbsp;</td</tr>
<%
End If

do While NOT rs.eof
...etc...

+++

"bob lin" <bobl...@yahoo.com> wrote in message

news:ODaK6OEC...@TK2MSFTNGP11.phx.gbl...

Bob Lin

unread,
Apr 21, 2003, 11:46:02 PM4/21/03
to
Jack,

I moditied rs.MoveFirst following your instruction (see below) and preview
shows one black row. However, when it runs, between two Required Dates don't
insert a row. Some one also suggested that "If you want a blank row then
inside the loop add something like...

<tr><td colspan="5">&nbsp;</td></tr>

or add an <hr> inside the row... "

I tried to add <tr><td colspan="5">&nbsp;</td</tr> and got the same result.
The preview shows two rows but real test didn't make any different. I don't
understand how to "add an <hr> inside the row... ". do you?

Modified rs.MoveFirst

.<%
Dim lastorderdate
lastorderdate = ""

rs.MoveFirst
If ((lastorderdate <> rs("Required Date")) AND (lastorderdate <> "")) Then
' Change lastorderdate to the new date
lastorderdate = rs("Required Date")

' Write out blank row
%>
<tr><td colspan="5" bgcolor=#000000">&nbsp;</td></tr>
<%
End If

do While NOT rs.eof
%>

"Jack Brewster" <rep...@thenewsgroup.please> wrote in message

news:eETKLfFC...@TK2MSFTNGP10.phx.gbl...

Bob Lin

unread,
Apr 22, 2003, 12:39:23 AM4/22/03
to
Sorry. adding "<tr><td colspan="5">&nbsp;</td</tr>" into rs.MoveFirst did
add one row between the table title and the data but not between each order.

thanks.


"Bob Lin" <nor...@hotmail.com> wrote in message
news:uJt17GIC...@TK2MSFTNGP12.phx.gbl...

xmas

unread,
Apr 22, 2003, 7:43:05 AM4/22/03
to
Hi Bob,

Well what I was talking about you did.. But I can see that is not what you
needed...

IMHO you are displaying too much information.
Maybe you could filter down to the "Order"??
Having a drop-down box with all of the "Distinct" order numbers..
Then, when selected, the next page would show that order and all the items..
For me that would be easier to do..

Just a thought..

xmas
www.xmas-i-am.com
======================


"bob lin" <bobl...@yahoo.com> wrote in message

news:#usxsJEC...@TK2MSFTNGP10.phx.gbl...

Bob Lin

unread,
Apr 22, 2003, 8:17:38 AM4/22/03
to
xmax,

I like this idea. But I am beginner. Could you give me a sample?

Thanks.

bob

--
For more information, go to http://www25.brinkster.com/ChicagoTech

Don't send e-mail or reply to me except you need consulting services.
Posting on MS newsgroup will benefit all readers and you may get more help.

Robert Lin, MS-MVP, MCSE & CNE
Windows & Network Support, Tips and FAQs on
http://www25.brinkster.com/ChicagoTech
This posting is provided "AS IS" with no warranties.

"xmas" <xmas@xmas-i-am No Spam.com> wrote in message

news:eI5TjRMC...@TK2MSFTNGP10.phx.gbl...

xmas

unread,
Apr 22, 2003, 8:31:16 AM4/22/03
to
Well I have to into work right now but will be back in about 2-3 hours and whip
you up something..

xmas


"Bob Lin" <nor...@hotmail.com> wrote in message

news:e1nmzkMC...@TK2MSFTNGP10.phx.gbl...

xmas

unread,
Apr 22, 2003, 1:28:10 PM4/22/03
to
Hi Bob,

Thought it would be sooner than this..
What I think will be the easiest way is to make up a web page and upload it to
my site.. I will then post the link here so you will have access to it...
Shouldn't take too long.. (might not look good but the info will all be there)

xmas
www.xmas-i-am.com
=====================


"xmas" <xmas@xmas-i-am No Spam.com> wrote in message

news:uW4hesMC...@TK2MSFTNGP11.phx.gbl...

bob lin

unread,
Apr 22, 2003, 1:42:05 PM4/22/03
to
xmas,

you can download the sources from
http://www25.brinkster.com/chicagotech/delivery.asp, invalid.asp and
password.asp. Do you need me to send you the date file?

Thank you very much.

bob
"xmas" <xmas@xmas-i-am No Spam.com> wrote in message

news:u90FaSPC...@TK2MSFTNGP10.phx.gbl...

xmas

unread,
Apr 22, 2003, 2:35:21 PM4/22/03
to
Hi Bob,
There is an old saying....

Give a man a fish
feed him for a day
Teach a man to fish
Feed him for life...

Still working on the sample site. Should be done in an hour or so...
When you see how simple it is you will wonder why you thought it was hard..
Only one place you have to hand code and only a few words..

xmas
www.xmas-i-am.com
=======================


"bob lin" <bobl...@yahoo.com> wrote in message

news:uCspmZPC...@TK2MSFTNGP10.phx.gbl...

xmas

unread,
Apr 22, 2003, 3:27:30 PM4/22/03
to
Hi Bob,

You will have to forgive the sloppy work...
None of the pictures (15) are in tables and tend to float a little but all the
information is there...

At the top of the page is a pic of the table.. Note that there are orders with
the same number...
But the Drop-down list will only have the number displayed once. Select "Click
Here to see the Sample" (above the picture to see what the finished looks like)
After selecting the order number click the submit button and you
will be taken to page 2... Page 2 will display all of the information for that
order number.

I would like to thank Kathleen Anderson [MVP- FP] for without her help this page
would not exists.

http://www.xmas-i-am.com/how_to_filter_drop-down.htm

xmas
www.xmas-i-am.com


=====================
"bob lin" <bobl...@yahoo.com> wrote in message

news:uCspmZPC...@TK2MSFTNGP10.phx.gbl...

Bob Lin

unread,
Apr 22, 2003, 3:42:49 PM4/22/03
to
Many thanks, Xmas. I will get back to you after test it.

bob

"xmas" <xmas@xmas-i-am No Spam.com> wrote in message

news:OCzTGVQC...@TK2MSFTNGP12.phx.gbl...

xmas

unread,
Apr 24, 2003, 10:52:14 AM4/24/03
to
Hopefully no news is good news.. But if you can't get it to work E-Mail me
direct using the Address at the bottom of the web site page...

xmas
www.xmas-i-am.com
================


"Bob Lin" <nor...@hotmail.com> wrote in message

news:OwGdodQC...@TK2MSFTNGP12.phx.gbl...

0 new messages