{"id":1133,"date":"2008-10-18T12:10:39","date_gmt":"2008-10-18T19:10:39","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/books\/?p=1133"},"modified":"2008-10-18T12:10:39","modified_gmt":"2008-10-18T19:10:39","slug":"1910-exporting-to-exchange-folders","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/1910-exporting-to-exchange-folders\/","title":{"rendered":"19.10 Exporting to Exchange Folders"},"content":{"rendered":"<h2>Exporting to Exchange Folders<\/h2>\n<p>&#x15;Crystal Reports lets you export a report to an Exchange folder. Table 19-8 shows the properties that need to be set for this to work.<\/p>\n<p>         <b>Table 19-8. ExchangeFolderDestinationOptions Properties.<\/b><\/p>\n<table border=\"1\">\n<tr>\n<th>Property<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>DestinationType<\/td>\n<td>The export destination type<\/td>\n<\/tr>\n<tr>\n<td>FolderPath<\/td>\n<td>The path of the Exchange folder<\/td>\n<\/tr>\n<tr>\n<td>Password<\/td>\n<td>The Exchange password<\/td>\n<\/tr>\n<tr>\n<td>Profile<\/td>\n<td>The user profile for accessing the Exchange folder<\/td>\n<\/tr>\n<\/table>\n<p>         <b>Listing 19-5. Export a report to an Exchange folder.<\/b><br \/>\n         <b>[VB.NET]<\/b><br \/>\n         <code>Public Sub ExportToExchange(ByVal myReport As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByVal FolderPath As String, ByVal Password As String, ByVal Profile As String)<\/code><br \/>\n         <code>'Set the destination type to ExchangeFolder<\/code><br \/>\n         <code>Dim myExportOptions As New CrystalDecisions.Shared.ExportOptions<\/code><br \/>\n         <code>myExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.ExchangeFolder<\/code><br \/>\n         <code>myExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat<\/code><br \/>\n         <code>'Instantiate an ExchangeFolder options object and set its properties<\/code><br \/>\n         <code>Dim myOptions As CrystalDecisions.Shared.ExchangeFolderDestinationOptions<\/code><br \/>\n         <code>myOptions = CrystalDecisions.Shared.ExportOptions.CreateExchangeFolderDestinationOptions()<\/code><br \/>\n         <code>myOptions.DestinationType = CrystalDecisions.Shared.ExchangeDestinationType.ExchangePostDocMessage<\/code><br \/>\n         <code>myOptions.FolderPath = FolderPath<\/code><br \/>\n         <code>myOptions.Password = Password<\/code><br \/>\n         <code>myOptions.Profile = Profile<\/code><br \/>\n         <code>myExportOptions.DestinationOptions = myOptions<\/code><br \/>\n         <code>myReport.Export(myExportOptions)<\/code><br \/>\n         <code>End Sub<\/code><br \/>\n         <b>[C#]<\/b><br \/>\n         <code>public void ExportToExchange(CrystalDecisions.CrystalReports.Engine.ReportDocument myReport, string FolderPath, string Password, string Profile)<\/code><br \/>\n         <code>{<\/code><br \/>\n         <code>\/\/Set the destination type to ExchangeFolder<\/code><br \/>\n         <code>CrystalDecisions.Shared.ExportOptions myExportOptions = new CrystalDecisions.Shared.ExportOptions();<\/code><br \/>\n         <code>myExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.ExchangeFolder;<\/code><br \/>\n         <code>myExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;<\/code><br \/>\n         <code>\/\/Instantiate an ExchangeFolder options object and set its properties<\/code><br \/>\n         <code>CrystalDecisions.Shared.ExchangeFolderDestinationOptions myOptions;<\/code><br \/>\n         <code>myOptions = CrystalDecisions.Shared.ExportOptions.CreateExchangeFolderDestinationOptions();<\/code><br \/>\n         <code>myOptions.DestinationType = CrystalDecisions.Shared.ExchangeDestinationType.ExchangePostDocMessage;<\/code><br \/>\n         <code>myOptions.FolderPath = FolderPath;<\/code><br \/>\n         <code>myOptions.Password = Password;<\/code><br \/>\n         <code>myOptions.Profile = Profile;<\/code><br \/>\n         <code>myExportOptions.DestinationOptions = myOptions;<\/code><br \/>\n         <code>myReport.Export(myExportOptions);<\/code><br \/>\n         <code>}<\/code><\/p>\n<p>This procedure sets the report object&#8217;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 and calls the Export() method.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exporting to Exchange Folders &#x15;Crystal Reports lets you export a report to an Exchange folder. Table 19-8 shows the properties that need to be set for this to work. Table 19-8. ExchangeFolderDestinationOptions Properties. Property Description DestinationType The export destination type FolderPath The path of the Exchange folder Password The Exchange password Profile The user profile [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,40],"tags":[],"class_list":["post-1133","post","type-post","status-publish","format-standard","hentry","category-chapter-19-exporting-and-deploying","category-crystal-reportsnet-2008","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=1133"}],"version-history":[{"count":0,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/1133\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}