我无法在水晶报告中显示任何结果

时间:2014-02-09 13:16:02

标签: crystal-reports

我正在开发一个网络应用程序,我无法在我的水晶报告中显示任何结果。我不知道我的代码有什么问题。请帮忙。

    Dim cnn As SqlConnection
    Dim connectionString As String
    Dim sql As String
    connectionString = "data source=SERVERNAME; _
    initial catalog=crystaldb;user id=sa;password=PASSWORD;"
    cnn = New SqlConnection(connectionString)
    cnn.Open()
    sql = "SELECT * FROM Grades
    Dim dscmd As New SqlDataAdapter(sql, cnn)
    Dim ds As New DataSet1
    dscmd.Fill(ds, "Grades")
    objRpt.SetDataSource(ds.Tables(1))
    CrystalReportViewer1.ReportSource = objRpt
    CrystalReportViewer1.RefreshReport()

1 个答案:

答案 0 :(得分:0)

我在加载时也面临很多问题尝试这些链接。 Try this

Or try this