Skip to Content

System.MissingMethodException on Export Function

Hi,

i try to make a small tool to export an Report to an PDF files using below code. The Form contain just 2 buttons and a CrystalReportViewer element.

The strange thing is, that doesn't matter, which kind of export i try (Excel, PDF, TXT) i always get this error message, tested under Visual Studio 2010 and 2013:

System.MissingMethodException: Method not found: "CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()".

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) bei CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) bei CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) bei CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() bei CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() bei WindowsApplication1.Form1.Button2_Click_1(Object sender, EventArgs e) in F:\Entwicklung\DotNet\PCRichard\Projects\WindowsApplication4\WindowsApplication4\Form1.vb:Zeile 26.

I'm currently have installed the CRforVS_13_0 and CRforVS_clickone_13_0_10.zip....

anybody have same problem or solution?

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

Public Class Form1

Dim cryRpt As New ReportDocument

Private Sub Button1_Click_1(sender As System.Object, e As System.EventArgs) Handles Button1.Click

cryRpt.Load("F:\Entwicklung\DotNet\PCRichard\Projects\WindowsApplication4\WindowsApplication4\CrystalReport1.rpt")

CrystalReportViewer1.ReportSource = cryRpt

CrystalReportViewer1.Refresh()

End Sub

Private Sub Button2_Click_1(sender As System.Object, e As System.EventArgs) Handles Button2.Click

Try

Dim CrExportOptions As ExportOptions

Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()

Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()

CrDiskFileDestinationOptions.DiskFileName = "c:\crystalExport.pdf"

CrExportOptions = cryRpt.ExportOptions

With CrExportOptions

.ExportDestinationType = ExportDestinationType.DiskFile

.ExportFormatType = ExportFormatType.PortableDocFormat

.DestinationOptions = CrDiskFileDestinationOptions

.FormatOptions = CrFormatTypeOptions

End With

cryRpt.Export()

Catch ex As Exception

MsgBox(ex.ToString)

End Try

End Sub

End Class

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 16, 2014 at 04:20 PM

    Hi Richard,

    Your code should work.

    How did you install Crystal Reports for Visual Studio? did you use the installer for VS or did you simply run the MSI in the redist package?

    Use this for integrating into VS:

    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_10.exe

    And then check your references, make sure they are Version 13.x.x.x

    Don

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.