使用Visual Studio 2015的Crystal Report数据源

时间:2019-01-25 21:43:32

标签: crystal-reports

我需要帮助

    Using Tempda As New SqlDataAdapter("Report_ItemsQty0", dbconnect)
        Tempda.SelectCommand.CommandType = CommandType.StoredProcedure
        Tempda.SelectCommand.Parameters.Clear()
        Tempda.SelectCommand.Parameters.Add("StorageID1", SqlDbType.BigInt).Value = TargetID1
        Tempda.SelectCommand.Parameters.Add("StorageID2", SqlDbType.BigInt).Value = TargetID2
        Using Tempds As New DataSet
            Tempda.Fill(Tempds)
            Dim rpt As New ReportDocument
            rpt.Load("D:\Report1.rpt")
            rpt.SetDataSource(Tempds.Tables(0))
            rpt.ReportOptions.EnableSaveDataWithReport = False
            rpt.Refresh()
            rpt.PrintToPrinter(1, False, 0, 0)
            CrystalReportViewer1.ReportSource = rpt
            CrystalReportViewer1.Refresh()
            CrystalReportViewer1.ReportSource = rpt
            CrystalReportViewer1.Refresh()
        End Using

    End Using

运行代码时出现错误

** CrystalDecisions.ReportAppServer.DataSetConversion.dll中发生了类型为'CrystalDecisions.CrystalReports.Engine.DataSourceException'的未处理异常

其他信息:未知查询引擎错误

文件C:\ Users \ awadien \ AppData \ Local \ Temp \ Report1 {5846E084-2412-4F14-BD37-66195E65FCAD} .rpt中的错误:

未知查询引擎错误**

它与vs2008一起使用却与vs2015一起使用时有什么问题

0 个答案:

没有答案