469,327 Members | 1,290 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

Add dividing line between grouped records...

Hi,

I have a simple asp page which throws out a list of products on order
by Customer X.

As the page writes out the lines, I want to add a Horizontal Rule when
the ProductName changes .... i.e.

Product A
Product A
Product A
_________________

Product B
Product B

_________________

Product C
Product C
Product C

And so on.

I can only get the code to write a line after each individual record.
Appreciate your help on this
Thanks in advance
David

Jul 22 '05 #1
2 1206
you will need to setup a test to see if the group has changed and then print
the line

Giving something like this

<%
Dim strProductName as string

Do until rstProducts.eof
if strProductName <> rstProducts("ProductName") Then
Response.write "<hr>"
end if

response.write rstProducts("ProductName")
strProductName = rstProducts("ProductName")

rstProducts.movenext
Loop
%>


<da***@scene-double.co.uk> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hi,

I have a simple asp page which throws out a list of products on order
by Customer X.

As the page writes out the lines, I want to add a Horizontal Rule when
the ProductName changes .... i.e.

Product A
Product A
Product A
_________________

Product B
Product B

_________________

Product C
Product C
Product C

And so on.

I can only get the code to write a line after each individual record.
Appreciate your help on this
Thanks in advance
David

Jul 22 '05 #2
<da***@scene-double.co.uk> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hi,

I have a simple asp page which throws out a list of products on order
by Customer X.

As the page writes out the lines, I want to add a Horizontal Rule when
the ProductName changes .... i.e.

Product A
Product A
Product A
_________________

Product B
Product B

_________________

Product C
Product C
Product C

And so on.

I can only get the code to write a line after each individual record.
Appreciate your help on this

Thanks in advance

David


Will this help?

Dim strPRD
strPRD = ""

<% If strPRD <> Product Then
If strORD <> "" Then
%>
<hr>
<% End If
strPRD = Product
End If
%>
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Melissa | last post: by
2 posts views Thread by Chris via AccessMonster.com | last post: by
1 post views Thread by mj | last post: by
2 posts views Thread by flyzone | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by listenups61195 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.