Skip to Content
avatar image
Former Member

Error: A document processed by the JRC engine cannot be opened in the C++

Hi,

I developed a Web Application, wich have some Crystal Reports. I am using VS2010, C#, Framework 4 and I installed the last version of CR.

The thing is that if I run the application with Visual Studio it works fine, it show the reportes without errors, but when I deploy it (in the same machine, just to try), I am getting the error:

Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack

[COMException (0x80041811): Unsupported Operation. A document processed by the JRC engine cannot be opened in the C+ stack+

+CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) 0

+CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) 147

+CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 422

[CrystalReportsException: Could not load the report.]

+CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 549

+CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) 1613

+CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) 161

+CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() 168

+CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ReportDefinition() 73

+AplicacionWeb.Shared.PrintReports.ImprimirReservaEvento(Int32 idEvento, Int32 idTipoEvento, String rutaNombreReporte) 143

+System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 154

+System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3707

This is the portion of code that calls the report.

protected void btnImprimirReserva_Click(object sender, EventArgs e)

{ PrintReports printReports = new PrintReports();

string ruta = string.Empty;

int idEvento = int.Parse(hdnIdEvento.Value);

int idTipoEvento= int.Parse(ddlTipoDeEvento.SelectedValue);

ruta = Server.MapPath("/Reportes
rptEvento.rpt");

printReports.ImprimirReservaEvento(idEvento, idTipoEvento, ruta);

}

public void ImprimirReservaEvento(int idEvento, int idTipoEvento, string rutaNombreReporte)

{ int cantCopias = (idTipoEvento == TiposEvento.Egreso.GetHashCode() ? 3 : 2);

TextObject originalDuplicado;

rptEvento oReporte = new rptEvento();

oReporte.FileName = rutaNombreReporte;

originalDuplicado = (TextObject)oReporte.ReportDefinition.ReportObjects["txtOriginalDuplicado"];

for (int i = 0; i < cantCopias; i++)

{

oReporte.SetParameterValue("@id_evento", idEvento);

if (i == 0)

{

originalDuplicado.Text = "Original";

}

if (i == 1)

{

originalDuplicado.Text = "Duplicado";

}

if (i==2)

{

originalDuplicado.Text = "Triplicado";

}

oReporte.PrintToPrinter(1, false, 0, 0);

}

}

I tried several things but I can not solve the problem. Could you please help me with that issue?

Edited by: frangambino on Feb 15, 2012 4:20 AM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers