F
Frank Teunen
Dear reader,
I'm having a problem linking a dataset to a crystal report.
I'm using next code. In between I explain my problem
'This code is to fill a dataset with the result of a stored
procedure on an SQL data base
Adapter_Sp_CoparnEmptyAfterDate.SelectCommand.Parameters("@Date").Value =
DateTimePicker1.Value
Adapter_Sp_CoparnEmptyAfterDate.Fill(DataSet_Sp_CoparnEmptyAfterDate)
'This works fine, because the next message box returns the number of
rows.
MsgBox(DataSet_Sp_CoparnEmptyAfterDate.Tables(0).Rows.Count())
'I have a crystal report predefined and based on the same dataset
Dim oRpt As New CrystalReport1
oRpt.Load()
oRpt.SetDataSource(DataSet_Sp_CoparnEmptyAfterDate)
'So far so good, but now ...
CrystalReportViewer1.ReportSource = oRpt
This code works perfectly on my PC where I develop: I see the result in the
viewer.
However on a deployment PC I receive error "Query engine error".
The user is exactly the same as on the development pc, so it is not a matter
of autorisation.
Any ideas ?
Thanks and kind regards
Frank
I'm having a problem linking a dataset to a crystal report.
I'm using next code. In between I explain my problem
'This code is to fill a dataset with the result of a stored
procedure on an SQL data base
Adapter_Sp_CoparnEmptyAfterDate.SelectCommand.Parameters("@Date").Value =
DateTimePicker1.Value
Adapter_Sp_CoparnEmptyAfterDate.Fill(DataSet_Sp_CoparnEmptyAfterDate)
'This works fine, because the next message box returns the number of
rows.
MsgBox(DataSet_Sp_CoparnEmptyAfterDate.Tables(0).Rows.Count())
'I have a crystal report predefined and based on the same dataset
Dim oRpt As New CrystalReport1
oRpt.Load()
oRpt.SetDataSource(DataSet_Sp_CoparnEmptyAfterDate)
'So far so good, but now ...
CrystalReportViewer1.ReportSource = oRpt
This code works perfectly on my PC where I develop: I see the result in the
viewer.
However on a deployment PC I receive error "Query engine error".
The user is exactly the same as on the development pc, so it is not a matter
of autorisation.
Any ideas ?
Thanks and kind regards
Frank