cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

View Entire Topic
former_member188030
Active Contributor
0 Kudos

Hi,

Take a look at below threads where this issue is discussed,

[http://forums.sdn.sap.com/thread.jspa?threadID=2011850|http://forums.sdn.sap.com/thread.jspa?threadID=2011850]

[http://forums.sdn.sap.com/thread.jspa?threadID=1975259|http://forums.sdn.sap.com/thread.jspa?threadID=1975259]

[http://forums.sdn.sap.com/thread.jspa?threadID=2031409|http://forums.sdn.sap.com/thread.jspa?threadID=2031409]\

Also, is it a 64 bit machine? check the target platform of the application and set it accordingly.

Few things to try

- Check if the reports exist and are accessible by the application (permissions, filepath,)

- Do not publish the report using the publish option, just as a test copy them manually.

See if this helps,

- Bhushan.

saurabh_pathak
Active Contributor
0 Kudos

You can also refer

[KB1603477 - Error: A document processed by the JRC engine cannot be opened in the C++ stack|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333633303333333433373337%7D.do]

and

http://www.sdn.sap.com/irj/scn/advancedsearch?query=AdocumentprocessedbytheJRCenginecannotbeopenedintheC%2B%2B

- Saurabh