Exporting to Exchange Folder Destination
Crystal Reports lets you export a report to an Exchange folder. Table 19-6 shows the properties that need to be set for this to work.
Table 19-6. ExchangeFolderDestinationOptions Properties.
Property | Description |
---|---|
DestinationType | The export destination type |
FolderPath | The path of the Exchange folder |
Password | The Exchange password |
Profile | The user profile for accessing the Exchange folder |
Public Sub SetDestinationExchangeFolder(ByVal MyReport As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByVal FolderPath As _
String, ByVal Password As String, ByVal Profile As String)
'Set the destination type to ExchangeFolder
MyReport.ExportOptions.ExportDestinationType = _
CrystalDecisions.Shared.ExportDestinationType.ExchangeFolder
'Instantiate an ExchangeFolder options object and set its properties
Dim Options As CrystalDecisions.Shared.ExchangeFolderDestinationOptions = _
New CrystalDecisions.Shared.ExchangeFolderDestinationOptions
Options.DestinationType = _
CrystalDecisions.Shared.ExchangeDestinationType.ExchangePostDocMessage
Options.FolderPath = FolderPath
Options.Password = Password
Options.Profile = Profile
MyReport.ExportOptions.DestinationOptions = Options
End Sub
This procedure first sets the report object’s destination type to be ExchangeFolder. Then it creates a new options object and assigns the parameters to the appropriate properties. The last step assigns the options object to the DestinationOptions property of the report object.