CrystalReportViewer - Default export folder
Is there a way to define the default export folder for a CrystalReportViewer control? I can store the location using an application setting, but I'm not sure how to apply it.
Here's the code I have so far:
Code:
Dim eoExportOps As New ExportOptions
Dim edoDefaultExportFile As New ExportDestinationOptions
Dim dfdoDiskOps As New DiskFileDestinationOptions
...
Private Sub frmAPFMReportCenter(ByVal Sender As System.Object, ByVal e As System.EventARgs) Handles MyBase.Load
eoExportOps.ExportDestinationType = ExportDestinationType.DiskFile
dfdoDiskOps.DiskFileName = My.Settings.DefaultReportFolder
eoExportOps.ExportDestinationOptions = dfdoDiskOps
End Sub
I get an error on the eoExportOps.ExportDestinationType line saying "Object reference not set to an instance of an object". "Use the NEW keyword to create an object instance".
I'm not sure solving that error will solve the problem, though.
Any ideas?