Hi, I am getting the following exception while integrating Crystal Report with my VS2017 ASP.NET Core Web API application:
System.TypeLoadException
HResult=0x80131522
Message=Method 'PrintReportWithDialog' in type 'CrystalDecisions.CrystalReports.Engine.FormatEngine' from assembly 'CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' does not have an implementation.
Source=CrystalDecisions.CrystalReports.Engine
StackTrace:
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at ReportService.Services.ParameterService..ctor() in D:\repositories\ReportService\ReportService\Services\ParameterService.cs:line 32
My environment:
Windows 10
Visual Studio 2017
Developing an ASP.NET Core Web API
NuGet packages:
CrystalDecisions.CrystaReports.Engine (1.0.0)
CrystalDecisions.ReportAppServer (1.0.0)
CrystalDecisions.ReportSource (1.0.0)
CrystalDecisions.Web (1.1.1)
CrystalReports.Shared (13.0.3501)
Microsoft.AspNetCore.All (2.0.6)
Swashbuckle.AspNetCore (2.4.0)
The exception happened with the following code, while executing ‘ReportDocument report = new ReportDocument()’ line bellow:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using ReportService.Models;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer;
….
ReportDocument report = new ReportDocument();
Please, what am I missing?
Thanks,