Hi guys
I am new with crystal reports and i am trying to load a crystal report wirh data . What i want is to display just one record on the crystal report. I want a user to enter say a customer name then using an sql string the record is searched from the database and displayed on textboxes as well as on a crystal report. I cant seem to get it to display the record on the cryatal report. i have a crystal reportviewer on the from.(vb.net 2003 and Access database)
this is the code am using
Thanks
I am new with crystal reports and i am trying to load a crystal report wirh data . What i want is to display just one record on the crystal report. I want a user to enter say a customer name then using an sql string the record is searched from the database and displayed on textboxes as well as on a crystal report. I cant seem to get it to display the record on the cryatal report. i have a crystal reportviewer on the from.(vb.net 2003 and Access database)
this is the code am using
Code:
Dim uname As String = txtcustomerid.Text
Dim connString As String = "Provider=Microsoft.Jet.oledb.4.0;Data source=D:\Documents and Settings\bob\My Documents\VB\Soldiers Of Christ\bin\S.O.C.mdb"
Dim myConnection As OleDbConnection = New OleDbConnection
myConnection.ConnectionString = connString
Dim da As OleDbDataAdapter = New OleDbDataAdapter("select * from SOCcustomerdetails where Customernumber = " & uname & "", myConnection)
Dim ds As DataSet = New DataSet
da.Fill(ds, "SOCcustomerdetails")
Dim x As New CrystalReport2
x.SetDataSource(ds)
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.ReportSource = x
Last edited by a moderator: