on 08-08-2012 4:05 AM
CrystalDecisions.CrystalReports.Engine.DataSourceException was caught
Message=Unknown Query Engine Error
Error in File C:\Users\msavage\AppData\Local\Temp\rptRunDown {3CDBB6A5-D45A-4DCD-94BA-D0DEE0A00E74}.rpt:
Unknown Query Engine Error
Source=CrystalDecisions.ReportAppServer.DataSetConversion
StackTrace:
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
at Crime_Information_System.frmRptRunDown.frmRptRunDown_Load(Object sender, EventArgs e) in C:\Users\msavage\Documents\Visual Studio 2010\Projects\Crime Information System\Crime Information System\frmRptRunDown.cs:line 79
InnerException: System.Runtime.InteropServices.COMException
Message=Unknown Query Engine Error
Error in File C:\Users\msavage\AppData\Local\Temp\rptRunDown {3CDBB6A5-D45A-4DCD-94BA-D0DEE0A00E74}.rpt:
Unknown Query Engine Error
Source=Analysis Server
ErrorCode=-2147482942
StackTrace:
at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)
at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
InnerException:
I have no idea what this means. I have never encountered this problem.
Hi Adrian,
need more info..
- Version of CR
- Version of VS?
- win or web app?
- Dev or prod machine?
- What does the app do?
- When does the error occur? any perticular method?
Thanks,
Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bhushan,
I'll be happy to provide more details.
-Version of CR - CRRuntime_64bit_13_0_1
-Version of VS - 2010
-Windows App-
-Dev Machine
-The app interfaces with azure sql server. I am using CR with datasets for reports. This is a law enforcement data base application.
-The error occurs when I try to set the datasource of the report. Here is my form's code
[code]
private void frmRptRunDown_Load(object sender, EventArgs e)
{
dsRunDown ds = new dsRunDown();
DataTable tblGangMemberBio = new DataTable();
tblGangMemberBio.TableName = "tblGangMemberBio";
DataTable tblIncidents = new DataTable();
tblIncidents.TableName = "tblIncident";
ReportDocument rptDoc = new ReportDocument();
tblGangMemberBio = LoadGangMemberBio();
//tblIncidents = LoadIncidents();
try
{
ds.Tables[0].Merge(tblGangMemberBio);
//ds.Tables[1].Merge(tblIncidents);
}
catch
{
}
try
{
rptDoc.Load("./rptRunDown.rpt");
}
catch
{
try
{
rptDoc.Load("../rptRunDown.rpt");
}
catch
{
try
{
rptDoc.Load("../../rptRunDown.rpt");
}
catch
{
rptDoc.Load("../../../rptRunDown.rpt");
}
}
}
//set dataset to the report viewer.
try
{
rptDoc.SetDataSource(ds); //error here
}
catch
{
}
crystalReportViewer1.ReportSource = rptDoc;
}
[/code]
I just started my project up today and I got a message that said I had used a previous version of crystal reports for ,net (which I had not) and asked me to convert. I did convert and now got a more explicit error message on that 2nd to last line of code rptDoc.SetDataSource(ds);
No source available. No symbols are loaded for any callstack frame. The source code can not be displayed
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
Hi Adrian,
You dont need the runtimes on DEV machine but the full install of CR for VS 2010.
Download below exe and install on top of VS 2010 (remove the runtimes).
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_4.exe
I think that should resolve the issue.
If not, use process monitor and check why the app is not able to access the crdb_adoplus.dll.
- Bhushan.
Bhushan, I am sorry for the long delay in my response. I actually do have the correct crystal reports version installed I just have an older version. I did however install the one from your link which upgraded my version but I am still having issues. The exception I am getting tells me that it can not find said .dll file located in "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll"
However there is no folder called dotnet1 in my directory. There is however a folder called dotnet which does not contain the required file either. I did find the file in the root of the folder win32_x86. I tried to run another project I am working on which also uses crystal reports and the reports in that project work completely fine. Is there a way that somehow crystal reports path changed in my current project? How can I point it to the right directory?
I found the solution. This needs to be added to app.config
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.