on 11-22-2018 8:17 AM
Hello,
I've installed Crystal Reports runtime engine for .NET Framework (64-bit) and Crystal Report, version for Microsoft Visual Studio(CRforVS_redist_install_64bit_13_0_23). The application is compiled as 64-bit app. It is using 64-bit Oracle Client. The app pool on IIS is for .NET CLR version: v4.0. Enable 32-bit applications: false.
With these settings I can run the app and access the database but cannot run reports:"Could not load file or assembly 'Reports' or one of its dependencies. An attempt was made to load a program with an incorrect format."
When I set Enable 32-bit applications to true than I can run reports but get Oracle exception.
Thank you in advance
Ah, check the CR assemblies, and try setting the Embedded Interopt Type to False in the properties of the assemblies:
CrystalDecisions.CrystalReports.Engine
CrystalDecisions.Shared
CrystalDecisions.ReportSource
and if you are using it:
CrystalDecisions.ReportAppServer.DataSetConversion
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add the CR for VS tag and will remove the CR SDK tag soon...
Use ProcessMonitor and see where it's loading the assemblies from, should be the GAC.
When you installing you must install as an Administrator
Try a test report with no DB connection info and just a text box with "Hello World" in it.
"Reports" is not a typical Assembly of ours, did you create your own class called "Reports"?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've created a test project that doesn't have db connection.
IList<Family> mySource = GenerateReportSource();
string reportName = @"C:\Sandbox\Reports\Reports\MyReport.rpt";
if (File.Exists(reportName))
{
reportDoc = new ReportDocument();
reportDoc.Load(reportName);
reportDoc.SetDataSource(mySource);
CrystalReportViewer1.ReportSource = reportDoc;
CrystalReportViewer1.DataBind();
}
It works when the app pool Enable 32-bit applications set to true.
But if it's set to false it throws an exception:"Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{98CDE168-C1BF-4179-BE4C-F2CFA7CB8398}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.