Private Sub cmdExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExport.Click 'sub exports report into file Dim strFileName As String Dim crExportType As ExportFormatType Dim strExportPath As String
'select type of file based on user input Select Case ddlExportType.SelectedItem.Text Case "Portable Document (PDF)" strFileName = strFileName + ".pdf" crExportType = ExportFormatType.PortableDocFormat
'sub exports report into file Dim strFileName As String
Dim crExportType As ExportFormatType
Dim strExportPath As String
'select type of file based on user input
Select Case ddlExportType.SelectedItem.Text
Case "Portable Document (PDF)"
strFileName = strFileName + ".pdf"
crExportType = ExportFormatType.PortableDocFormat
End Select希望对你有帮助