水晶报表查看器

时间:2015-09-23 04:55:51

标签: vb.net winforms crystal-reports

我在Windows窗体上使用Crystal报表13.0.2000xx和Crystal Report Viewer

Private Sub CrystalReportViewer1_Load(sender As Object, e As EventArgs) Handles CrystalReportViewer1.Load

    Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
    Dim myReport As New ReportDocument()
    myReport.Load("path")
    Dim myTables As Tables = myReport.Database.Tables

    For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
        Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
        With myConnectionInfo
            .ServerName = "localhost"
            .DatabaseName = "xxxxx"
            .UserID = "xx"
            .Password = "xxxxx"

        End With
    Next
    CrystalReportViewer1.ReportSource = myReport
End Sub

当我编译并单击导出按钮并选择导出到* .xls 没有Excel格式选项

我的旧项目使用较旧版本的水晶报告,它有一个excel格式选项,为什么它在较新版本的水晶报告中缺失

0 个答案:

没有答案