473,396 Members | 2,082 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,396 software developers and data experts.

dividing a recordset up for display?

I placed some code below...took out most of the unneeded html crap for
this.
this gives me a listing of phone charges...every other line with a
different color for easy reading.
What I want is this with all entries for the first "Service Number"
then a space then everything for the next "Service Number" on and on
until the end. Can someone tell me how to do this?

<table>
<tr>
<td>Service Number</td>
<td>Subscriber</td>
<td>Description</td>
<td>To Number</td>
<td><div><b>Duration </td>
<td>Connect Date</td>
<td>Amount</td>
</tr>

<%
Dim sBackgroundColor
sBackgroundColor = "#ffffff"

Do until rs.eof

If rs("Service Number") <> "" Then
If sBackgroundColor = "#ffffff" Then
sBackgroundColor = "#f7f7f7"
Else
sBackgroundColor = "#ffffff"
End If
%>

<tr bgcolor="<%=sBackgroundColor%>">
<td><%=rs("Service Number")%></td>
<td><%=rs("Subscriber User Name")%></td>
<td><%=rs("Description")%></td>
<td><%=rs("To Number")%></td>
<td align="center"><%=rs("Duration")%></td>
<td><%=rs("Connect Date")%></td>
<td align="right"><%=rs("Total Charge")%></td>
</tr>

<% End If
rs.MoveNext
Loop %>
</table>

Feb 7 '06 #1
8 1253
Can you reword the quoted part below? I tried, but I don't really
understand what you're trying to do here.

Ray at work

<ey****@ncsa.uiuc.edu> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
What I want is this with all entries for the first "Service Number"
then a space then everything for the next "Service Number" on and on
until the end.

Feb 7 '06 #2
Yes, what I have gives me every entry for 555-1111 then every entry for
555-1112 then 555-1113 in one big table...this because my query sorted
on "Service Number" which is the telephone number. One big recordset.

I think I want some kind of loop to run threw this and get all the
entries for 555-1111 then a space...then the next time threw the loop I
get everything for the next number.
I want to do some calculations but I won't have a problem with that if
I get the loop

Feb 7 '06 #3
I'm not looking for someone to write script for me...I just need to
know what to do.

I'm guessing I need a for each loop here.
But how do I go about that...I've looked at some web samples but they
don't trigger anything in my super human intelligent brain :)

Feb 7 '06 #4
So, you're saying that you get:

555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1112 data data data
555-1112 data data data
555-1112 data data data
But what you want is:
555-1111 data data data
data data data
data data data
data data data
555-1112 data data data
data data data
data data data

If so, here's an option: http://www.aspfaq.com/show.asp?id=2241 Be sure to
read the whole page and not just grab the first code sample!

Ray at work

<ey****@ncsa.uiuc.edu> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Yes, what I have gives me every entry for 555-1111 then every entry for
555-1112 then 555-1113 in one big table...this because my query sorted
on "Service Number" which is the telephone number. One big recordset.

I think I want some kind of loop to run threw this and get all the
entries for 555-1111 then a space...then the next time threw the loop I
get everything for the next number.
I want to do some calculations but I won't have a problem with that if
I get the loop

Feb 7 '06 #5
Yes!

Feb 7 '06 #6
Thank You

Feb 7 '06 #7
ljb

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Og**************@TK2MSFTNGP11.phx.gbl...
So, you're saying that you get:

555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1112 data data data
555-1112 data data data
555-1112 data data data
But what you want is:
555-1111 data data data
data data data
data data data
data data data
555-1112 data data data
data data data
data data data

If so, here's an option: http://www.aspfaq.com/show.asp?id=2241 Be sure to read the whole page and not just grab the first code sample!

Ray at work


My preference for doing this is to dump the entire record set into an array
with myarray = rs.getrows. That way I don't have to keep previous row values
in variables and check if they changed. All I do is check the current column
and row against the value on
if myarray(CurCol, CurRow) <> myarray(CurCol, CurRow -1) then...
Feb 8 '06 #8
If using classic ADO, you could also consider using a hierarchical (shaped)
recordset
Feb 8 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andie | last post by:
Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. Many thanks in advance. -- Andie
8
by: Hung Huynh | last post by:
Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to work. For example, I have 10 records in my rsData...
2
by: Rob Meade | last post by:
Lo all, I have a local recordset which is not linked to a database. Some of the fields in this recordset contain html tags. I have a function which is called when I'm calculating my...
8
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
by: Lyn | last post by:
Hi, I am opening a form in Continuous mode to list the records from a recordset created in the calling form. The recordset object is declared as Public and is set into the new form's Recordset...
36
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
2
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my...
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
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
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,...
0
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...

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.