cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes
View Entire Topic
Former Member
0 Likes

Hi frangambino,

I also got the error few weeks before. I just did as like below

1. Right click the Rpt file.

2. Choose the properties

3. Changed

a. Build Action as "Content"

b. Copy to Output Directory as "Do not Copy"

c. Put Empty for Custom Tool and Custom Tool Namespace

After did the above steps i deploy my application and then it works fine for me.

Hope it will help you.

Thanks,

Ramesh.

Edited by: Ramesh.R on Feb 28, 2012 3:39 PM

Former Member
0 Likes

Hello sir,

but after changing as you said earlier

                1. Right click the Rpt file.

                2. Choose the properties

                3. Changed

                             a.   Build Action as "Content"

                             b.   Copy to Output Directory as "Do not Copy"

                             c.   Put Empty for Custom Tool and Custom Tool Namespace

print function not working , it show blank boxes  in output of print.

, is there any idea about this matter ?

Thanks