Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yet another data source gripe!!

Status
Not open for further replies.

protechdm

Programmer
Dec 30, 2001
36
GB
Hi,

Platform .NET / Access 2000 / Win2000 / CR version whatever-was-in-the-latest-.net-service-pack.

Basically I have one report that suits 2 different tables ( same structure ) in an Access database. So, I added 1 of the tables - GROSSWP - to the report purely for design purposes. It was chosen via OLE DB(ADO) >> database.mdb >> Views >> GROSSWP.

The following code is an attempt to overwrite the data source with a dataset containing a table with exactly the same structure as GROSSWP in a standard windows form with a report viewer:-

query = "select * from cashbord"
Dim conn As String = _
"Provider=Microsoft.Jet.OLEDB.4.0; Data
Source='c:\development\barnsley\data\insite.mdb'"
Dim myoleconn As New
System.Data.OleDb.OleDbConnection(conn)
Dim myoleadapter As New
System.Data.OleDb.OleDbDataAdapter()
Dim mydataset As Data.DataSet = New DataSet()
myoleadapter.SelectCommand = New
System.Data.OleDb.OleDbCommand(query, myoleconn)
myoleadapter.Fill(mydataset, "stndbord")

Dim bord As New Old_Summary_Bordereau()
bord.SetDataSource(mydataset)
Me.CrystalReportViewer1.ReportSource = bord
bord.Refresh()

It still gives me the data from GROSSWP.

Any ideas?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top