Query engine error on crystal report based on stored procedure

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
 
F

Frank Teunen

Found solution myself.

I had .net framework 2.0 installed on deployment pc and crystal reports
version from visual studio 2003 can only work with version 1.1


"Frank Teunen" <[email protected]> schreef in bericht
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top