Hi. I have a component in vb.net to export to pdf . When the application runs on Windows 10 , when exporting to PDF , reports an exception in the type initializer " CrystalDecisions.CrystalReports.Engine.ReportDocument " . In other versions of Windows , it works ok . Anyone know how to solve the problem?
This is the method of the class that performs export to pdf:
Methods:
Public Sub New()
MyBase.New()
End Sub
Public Sub ExportarRptToPDF(ByVal pRutaRPT As String, ByVal pRutaPDF As String)
Dim rep As New CrystalDecisions.CrystalReports.Engine.ReportDocument
rep.Load(pRutaRPT, CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy)
Try
rep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, pRutaPDF)
Catch ex As Exception
Dim s As String = ""
End Try
End Sub
Thank you very much!
Joaquín .