{"id":755,"date":"2008-01-04T19:58:12","date_gmt":"2008-01-05T02:58:12","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/19-6-exporting-to-disk\/"},"modified":"2010-11-17T18:48:37","modified_gmt":"2010-11-18T01:48:37","slug":"19-6-exporting-to-disk","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/19-6-exporting-to-disk\/","title":{"rendered":"19.06 Exporting to Disk"},"content":{"rendered":"<h2>Exporting to a Disk<\/h2>\n<p>Setting the destination type to disk is simple because there are only a couple properties. You have to instantiate a DiskFileDestinationOptions object and assign the filename to it. As you can see in Table 19-4, this is the only property available.<\/p>\n<p>         <b>Table 19-4. DiskFileDestinationOptions Properties.<\/b><\/p>\n<table border=\"1\">\n<tr>\n<th>Property<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>DiskFileName<\/td>\n<td>The filename used for saving the report<\/td>\n<\/tr>\n<\/table>\n<p>The following code takes a report object and sets it to use a file as the destination.<\/p>\n<p>         <code_Caption>Listing 19-2. Setting the destination to a disk file<\/code_Caption><br \/>\n         <code>Public Sub SetDiskFileDestination(ByRef MyReport As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByVal FileName As String)<\/code><br \/>\n         <code>'Set the destination type to DiskFile<\/code><br \/>\n         <code>MyReport.ExportOptions.ExportDestinationType = _<\/code><br \/>\n         <code>CrystalDecisions.Shared.ExportDestinationType.DiskFile<\/code><br \/>\n         <code>'Instantiate a DiskFileDestinationOptions object and set the<\/code><br \/>\n         <code>'FileName property<\/code><br \/>\n         <code>Dim Options As CrystalDecisions.Shared.DiskFileDestinationOptions = _<\/code><br \/>\n         <code>New CrystalDecisions.Shared.DiskFileDestinationOptions<\/code><br \/>\n         <code>Options.DiskFileName = FileName<\/code><br \/>\n         <code>'Assign the object to the report<\/code><br \/>\n         <code>MyReport.ExportOptions.DestinationOptions = Options<\/code><br \/>\n         <code>End Sub<\/code><\/p>\n<p>Pass this procedure a report object and a filename. It first sets the destination type to be DiskFile. Then it instantiates an options variable and sets its DiskFileName property to be the Filename string that was passed to the procedure. The last step assigns this destination object to the report object.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exporting to a Disk Setting the destination type to disk is simple because there are only a couple properties. You have to instantiate a DiskFileDestinationOptions object and assign the filename to it. As you can see in Table 19-4, this is the only property available. Table 19-4. DiskFileDestinationOptions Properties. Property Description DiskFileName The filename used [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,2],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","hentry","category-chapter-19-exporting-and-deploying-reports","category-crystal-reportsnet-2003","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/755","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=755"}],"version-history":[{"count":1,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":1668,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/755\/revisions\/1668"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}