<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>Export a Crystal Report to a file</Title>
			<Author>Business Objects</Author>
			<Description>Exports a Crystal Report to a file.</Description>
			<HelpUrl>http://www.businessobjects.com/products/dev_zone/net/default.asp</HelpUrl>
			<Keywords>
			</Keywords>
			<Shortcut>crExportRptToDisk</Shortcut>
			<Location>Crystal Reports</Location>
		</Header>
		<Snippet>
			<References>
				<Reference>
					<Assembly>CrystalDecisions.CrystalReports.Engine.dll</Assembly>
					<URL />
				</Reference>
				<Reference>
					<Assembly>CrystalDecisions.Shared.dll</Assembly>
					<URL />
				</Reference>
			</References>
			<Imports>
				<Import>
					<Namespace>System</Namespace>
				</Import>
				<Import>
					<Namespace>CrystalDecisions.CrystalReports.Engine</Namespace>
				</Import>
				<Import>
					<Namespace>CrystalDecisions.Shared</Namespace>
				</Import>
			</Imports>
			<Declarations>
				<Literal>
					<ID>FileName</ID>
					<Type>String</Type>
					<ToolTip>Replace this string with the name of the report file you want to export from.</ToolTip>
					<Default>"C:\My Crystal Reports\Report Name.rpt"</Default>
				</Literal>
				<Literal>
					<ID>ExportFormatType</ID>
					<Type>String</Type>
					<ToolTip>Replace this value with the export format Type that you want to export the report to.</ToolTip>
					<Default>ExportFormatType.PortableDocFormat</Default>
				</Literal>
				<Literal>
					<ID>DestinationFileName</ID>
					<Type>String</Type>
					<ToolTip>Replace this string with the file name you want to export the report to.</ToolTip>
					<Default>"C:\My Crystal Reports\Report Name.pdf"</Default>
				</Literal>
			</Declarations>
			<Code Language="VB" Kind="method body"><![CDATA[' You can change other export options like page range by calling Export method with a ExportOptions object.
				Dim report As New ReportDocument()
				report.Load($FileName$)
				report.ExportToDisk($ExportFormatType$, $DestinationFileName$)
				report.Close()
                ]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>