Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Reports for Visual Studio 2010 Error

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?

like image 367
Kumar Avatar asked Nov 28 '10 00:11

Kumar


People also ask

How do I fix a Crystal Report error?

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.

How do I add a SAP Crystal Report reference in Visual Studio 2010?

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.

How do I edit a Crystal Report in Visual Studio 2010?

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.

Will Crystal Reports run on Windows 10?

Crystal Report XI R2 will work with Windows 10 64 bit OS.


1 Answers

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 ?

like image 52
Priyan R Avatar answered Oct 11 '22 11:10

Priyan R