Populating a typed data set from an array list

mcostello

Member
Joined
Dec 12, 2005
Messages
6
Programming Experience
5-10
I am building a crystal report using vb.net. Most of my reports are driven from calling a stored procedure using a dataadapter to populate a typed dataset.
i.e.
' get data from database into typed dataset
Dim da AsNew SqlClient.SqlDataAdapter( "sp_AllBusiness", db_connection)
Dim ds AsNew dsallbusiness
' set the stored procedure parameter values
With da.SelectCommand
.CommandType = CommandType.StoredProcedure
.Parameters.Add("@type", 1)
EndWith
' map the generic "Table" to the typed dataset table
da.TableMappings.Add("Table", "sp_AllBusiness")
' fill the dataset
da.Fill(ds)
rptAllBusiness1.SetDataSource(ds)

One of the reports needs to do something slightly different.

What I have is a set of objects in a collection (a collection of people selected from a list say)
I pass this collection object to the form that will generate the report.
What I need to do is populate the typed dataset with the information in the collection.

Any help much appreciated

Mark
 
Back
Top