Những phiên bản sắp tới của Visual Studio .NET và .NET Framework sẽ có khả năng tích hợp chặt chẽ với các sản phẩm chiến lược quan trọng khác như Microsoft Windows .NET Server hay phiên bản tiếp theo của SQL Server, có tên mã " Yukon ". | Chapter 9 If the PrinterName string is empty the default printer is selected. If you do change the page margins you will need to use the Printoptions class s ApplyPageMargins method to apply your changes. If you are migrating your code from Visual Basic keep in mind that the Crystal Report Engine in Visual Studio .NET no longer supports the SelectPrinter method that was so handy in previous versions it would pop up the standard Select Printer dialog for you . To use this functionality within Crystal you will need to open the Select Printer dialog yourself get the name of the printer and then set the PrinterName property of the Printoptions class. Exporting Your Report In addition to printing your report without the viewer you can also export your report without having to use the export button available on the Crystal Report viewer. Within the ReportDocument methods there is a method called Export which can be used to export directly from your application. Unlike the PrintReport method which would just print the report to the default printer there are a number of properties that need to be set before you can actually call the Export method. Here is a rundown of all of the properties and objects that are related to the Exportoption class Property Description Destinationoptions Returns or sets the DestinationOptions object including DiskFileDestinationOptions ExchangeFolder DestinationOptions and MicrosoftMailDestination Options ExportDestinationType Returns or sets the export destination type ExportFormatType Returns or sets the export format type FormatOptions Returns or sets the FormatOptions object including ExcelFormatOptions HTMLFormatOptions and PdfRtfWordFormatOptions So in another example we could add another button to our form to export the report as shown in Figure 9-3 282 Working with the Crystal Reports Engine Figure 9-3 Name the button Export_Button and change the Text property to Export Report. The code behind the button sets all of the