cancel
Showing results for 
Search instead for 
Did you mean: 

ASP.NET with Crystal Reports doesn't work on Windows Server 2012 R2.

amauri_derato64
Explorer
0 Kudos

Hello,

I uptaded my project to CR 2020 and .net framework to 4.7.2.

Works fine in my local machine.

When I deployed on my Server(Windows Server 2012 R2 Standard, x64) I got the Exception:

CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
at Ticket.WattsBenefit.Web.BasePage.Processa_OnLine(RelatorioLogInfo Log) in C:\Projects\Watts\Reports\BR\WattsBenefit\Ticket.WattsBenefit.Web\Base\BasePage.cs:line 1675System.Runtime.InteropServices.COMException (0x800002CD): Erro no arquivo a9f76c4c-de60-4c24-aace-190dc0472b42_REL161 13528_10800_{75BD9C49-974F-4C9C-B3FD-77842D56413B}.rpt: falha ao carregar informações do banco de dados.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

In the line 1675 from file, I have this:

stream = Log.TipoArquivo.Codigo == 1 ? report.ExportToStream(ExportFormatType.PortableDocFormat) : report.ExportToStream(ExportFormatType.Excel);

What It's missing? Could help me?

DellSC
Active Contributor

The Crystal for Visual Studio SDK is not packaged with Crystal 2020. What versions of VS and the SDK are you using? Is your application 32-bit or 64-bit?

amauri_derato64
Explorer
0 Kudos

I'm using VS 2019 Professional with .NET Framework 4.7.2.

My application is 64-bit.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

CR runtime is for your app mode and not Windows x64 or x86.

Run the MSI packages on your app server to install the CR runtime,

You may be missing the VC 2015 C++ runtime, or the Framework files. INstall all the latest windows update.

amauri_derato64
Explorer
0 Kudos

Don,

I tried all as you asked, but didn´t work...and I'm still got the same exception: crystal reports failed to retrieve data from the database...

I'm still looking for answer, researching on the net...
Tell me something please...My reports files are recorded in the folder(e.g. D:\Reports) and my application try to read them...What do you think? Can be a permission problem? And just occur in my Windows Server 2012 R2.

If you need more information to help me to investigate let me know...

Thanksss

Answers (1)

Answers (1)

0 Kudos

AS Dell noted you are not using any CR runtime now.

You can get SP 30 from here and read all about it:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Install the EXE to integrate into VS, the rest are for distributing the CR runtime, not required to be installed on your DEV PC.

Don

amauri_derato64
Explorer
0 Kudos

Don,

Thanks for answer, but I couldn't understand very well, sorry.

I got SP 30 here:

In my web project I deleted the old references and added again:

I changed my target net framework from 3.5 to 4.7.4. And when I run the application in my local machine, everything going OK...works fine...My Dev PC is Windows 10 64-bit.

So, after I published this web application in my windows server 2012 R2 and I got the exception as I mentioned before.

What are the pre-requisites to run this application on Windows Server 2012 R2? I need the runtime engine?

Could help me please?