bghanim
Active member
Hi All,
I need to do with my application dynamic report i.e. to make the report read its data source from a dataSet.
look at this code:
Dim con As New OleDb.OleDbConnection
Dim dataAdp As New OleDb.OleDbDataAdapter
Dim dataSetObj As New dataSet <<<--------------------
Dim sql As New OleDb.OleDbCommand
con.ConnectionString = conStr
sql.CommandText = "select * from cl_doctors where dr_name like '" & me.textBox1.text & "'"
sql.Connection = con
dataAdp.SelectCommand = sql
Try
con.Open()
dataAdp.SelectCommand.ExecuteNonQuery()
dataAdp.Fill(dataSetObj, "cl_doctors")
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
I need to make the dataSetObj as the data source of the crystal report.
can any one help me ?
Regards,
Baha
I need to do with my application dynamic report i.e. to make the report read its data source from a dataSet.
look at this code:
Dim con As New OleDb.OleDbConnection
Dim dataAdp As New OleDb.OleDbDataAdapter
Dim dataSetObj As New dataSet <<<--------------------
Dim sql As New OleDb.OleDbCommand
con.ConnectionString = conStr
sql.CommandText = "select * from cl_doctors where dr_name like '" & me.textBox1.text & "'"
sql.Connection = con
dataAdp.SelectCommand = sql
Try
con.Open()
dataAdp.SelectCommand.ExecuteNonQuery()
dataAdp.Fill(dataSetObj, "cl_doctors")
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
I need to make the dataSetObj as the data source of the crystal report.
can any one help me ?
Regards,
Baha