473,385 Members | 1,343 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,385 software developers and data experts.

Loop through dataset - check values

Currently I have a dataset that populates as follows (example data):

ID Cycle Drug_Day Name
3 1 1 Initial
3 1 15 Initial
3 2 1 Initial
3 2 15 Initial
3 3 1 Initial
3 3 15 Initial

The problem comes in that currently all this data is being "dumped" to
labels. The labels for the above data would look like this:

C1; D1; Initial
C1; D15; Initial
C2; D1; Initial
C2; D15; Inital
C3; D1; Inital
C3; D15; Inital

They want it better formatted so they look better (understandable).
Well what they want two different checks of the data be ran. First
check would see if all the Cycles had identical data (as-is the case
above) and in that case the display then would be:

Cx; D1, 15; Initial (the x meaning "all cycles" and the days grouped to
minimize space)

The second check they want ran is on the "name" column. With the data
above; they all have the same values; but sometimes it will have
different values. So if those are different; they want them broken out;
but grouped together as much as possible. So in the above data example
I'll change the data a little bit:

ID Cycle Drug_Day Name
3 1 1 Initial
3 1 15 Initial
3 2 1 Initial
3 2 15 Sequential
3 3 1 Initial
3 3 15 Initial
So now the readout on the labels should be:
C1; D1, 15; Initial
C2; D1; Initial
C2; D15; Sequential
C3; D1, 15; Initial

So what I need is a check on all the rows of the dataset and then change
the data in the dataset depending on what is the same. Does that make
sense? The hard part is that the data are going to change heavily.
Sometimes more than 3 cycles; sometimes more than 2 different drug days;
sometimes the "name" field will change. so I'm having difficulty coming
up with the logic to run through the rows and compare the different
rows. Any help would be much welcomed.
Jul 24 '06 #1
0 1447

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

Similar topics

8
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
1
by: TJS | last post by:
Is there a way to do this ??
3
by: Mark | last post by:
Hi - when working with datasets, is it quicker to loop through the dataset, comparing some column values with predetermined values, or should I apply a filter on the dataset to retrieve the values...
4
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox),...
4
by: CMW | last post by:
In VB.NET I'm retrieving a single table from a SQL Server (tblformdata). I need to search each record in the dataset to see if any data is missing from the records (i.e., missing first name,...
1
by: Matt Tinson | last post by:
Hello I have a datagrid with a datetimepicker column in it, which is bound to a dataset (MyDataset). The column in the dataset set that is mapped to the datetimepicker is called MyOrderDate and...
5
by: srini.venkatesan | last post by:
I am creating an XML webservice where by I am sending the a string of XML to the consumer. The consumer receives the XML and converts into dataset and able to update the rows to the database. The...
16
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataAdapter. For every record in tblA where colB = 'abc', I want to update the value in colA. In VB6, using ADO I can loop thru the recordset,set the...
5
by: dp_pearce | last post by:
I have some code that takes data from an Access database and processes it into text files for another application. At the moment, I am using a number of loops that are pretty slow. I am not a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.