Vivek Ganapathi
Vivek Ganapathi

Reputation: 1

Crystal Reports exception in Visual Studio 2013

rptdoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "DO- " + DateTime.Now.ToString("dd-MM-yyyy HHmmss"));

Above line of code is throwing this exception:

An exception of type 'System.MissingMethodException' occurred in CrystalDecisions.CrystalReports.Engine.dll but was not handled in user code

Additional information: Method not found: 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()'

I am using Visual Studio 2013 and Crystal Reports 13

Upvotes: 0

Views: 15606

Answers (3)

Kazem
Kazem

Reputation: 1538

Once I faced the same issue on my production server. until the day before everything was working good, but the next day, the error was showing up.

After long hours struggling with issue i remembered for some testing reasons, i had changed the "Application Pool Settings -> Enable 32-Bit Applications" to True, while my server is 64bit; i changed it back to false and everything got normal.

If your server is 32 make this option True, otherwise make it false.

enter image description here

Upvotes: 2

Smart Dev
Smart Dev

Reputation: 449

if your windows is x64 make sure you make your application target x64 or any CPU not X86 and the same if you use windows 32 bit make sure that you set project to target x86

Upvotes: 0

Abdulrahman_88
Abdulrahman_88

Reputation: 560

try to add this in your code:

VB.Net

 Imports CrystalDecisions.Shared
 Imports CrystalDecisions.CrystalReports.Engine

C#

using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;

and Add a reference to your project for the required dll, or you can install crystal report viewer to your machine

Upvotes: 0

Related Questions