Question : "Export Failed" in VB.Net and Crystal Reports 10

I have written a VB.net 2008 windows applicaton that allows the user to display, print, and export a Crystal Report 10 report if they chose.  All of this works fine except for the export.  When the user clicks the Export button (icon) on the CrystalReportViewer1 control, then selects exporting to a .pdf, then enters the file name, they get the following error messages:

Object reference not set to an instance of an object.
Export failed.

Attached is the code in the VB form that contains the CrystalReportsViewer1 control.

Thank you for the help.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Runtime.InteropServices
Imports System.Threading

Public Class Audit_Report
    Private mReport As Audit_CR_Report

    Private Sub Audit_Report_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        srDisplay_Report()
    End Sub

    Private Sub srDisplay_Report()
        Dim mReport = New Audit_CR_Report

        mReport.SetParameterValue("mOffer_Id", mReport_Parm1)
        mReport.SetParameterValue("mChkFile1_Name", mReport_Parm2)
        mReport.SetParameterValue("mRadFile2_Name", mReport_Parm3)
        mReport.SetParameterValue("mShow_Which_Records", mReport_Parm4)
        mReport.SetParameterValue("mUser_Name", mReport_Parm5)

        CrystalReportViewer1.ReportSource = mReport
        CrystalReportViewer1.Zoom(75)
    End Sub

    Private Sub Audit_Report_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Me.Dispose()
        Me.Finalize()
        GC.Collect()
    End Sub
End Class

Answer : "Export Failed" in VB.Net and Crystal Reports 10

I don't think a reinstall is needed but you may need to install the export dlls.

mlmcc
Random Solutions  
 
programming4us programming4us