I am trying to run a crystal report from my web application which was built using ASP.NET 4.0 and Visual Studio 2010. I have installed the following from the SAP site (http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp)
1) SAP Crystal Reports, version for Visual Studio 2010 - Standard EXE installation package which installs the software into the Visual Studio IDE.
2) SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit)
I have a page called Reports.aspx in which I have a crystal report viewer control
<CR:CrystalReportViewer ID="rptViewer" runat="server" AutoDataBind="true" />
In the Reports.aspx.cs file I have the following code:
protected override void OnPreRender(EventArgs e)
{
ReportDocument report = new ReportDocument();
var path = Server.MapPath("Reports/Sample.rpt");
report.Load(path);
report.SetDatabaseLogon("username", "password", "servername", "databasename");
rptViewer.ReportSource = report;
}
On the report.Load(path) line I get the following error:
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
How can I fix this?
Solution 1: Make sure the full version of Crystal is installed on your workstation. The error message may display if you are accessing the runtime dlls from the network instead of your workstation. Solution 2: Check the printer setup.
Adding Crystal Reports References Using Visual Studio .Open the Solution Explorer, expand the Project tag in the tree and select the References tag. Right mouse click and select Add Reference. Step 2: On the Add Reference dialog, select the CrystalDecisions. CrystalReports.
Solution 1 When Crystal Reports & Visual Studio with Crystal Reports is installed you will always get this option if you double-click a Report file. Instead open the application you want to edit the Report in & select File >> Open in Crystal Reports or File >> Open >> File in Visual Studio.
Crystal Report XI R2 will work with Windows 10 64 bit OS.
I also got into the same problem my problem was report path was not valid, May be you have same problem , check Server.MapPath("Reports/Sample.rpt") returning valid path ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With