473,473 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

Similar topics

4
by: Ken Fine | last post by:
Using ASP, I want to display a series of records grouped by nested years and months, e.g.: 2004 December Record1 Record2 Record3 November Record4
2
by: Melissa | last post by:
I have a grouped report that starts a new page at each group. All the field labels for the report are in the group header because there is a subreport in the top part of the report that needs to...
1
by: Melissa | last post by:
Can anyone help me with this --- I have a grouped report with a subreport in the group footer and the report starts a new page for each group. The subreport is based on a query which has...
2
by: Chris via AccessMonster.com | last post by:
I have done something like this a million years ago my developer skills have diminished to nothing but now I am at a new job trying to regroup what I lost. This one came across my desk recently. I...
1
by: mj | last post by:
I am new to ASP.NET and would like to create a table with grouped data e.g. BOLD TITLE Sales Bill Fred George BOLD TITLE Accounts Alan Carl
2
by: schapopa | last post by:
Hi, I want to create query where I could group records by quarters, and get the last record in each group. e.g Create Table MyTable ( Value , date )
2
by: flyzone | last post by:
Goodmorning people :) I have just started to learn this language and i have a logical problem. I need to write a program to parse various file of text. Here two sample: --------------- trial...
2
by: Jejune | last post by:
I recently saw a post that tackled an issue I was struggling with. It allowed me to get the results I wanted, but I need the expand on that. Original Post...
1
by: nospam | last post by:
I have a report to count some statistics of case data. I can't figure out how to make Access group and sum/count information to give me a nice statistics report. Basically the database has case...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.