加载报表失败??
zzxap 2008-11-29 11:34:41 Private Sub band()
Dim logOnInfo As New TableLogOnInfo()
Dim rpdMy0 As New ReportDocument()
logOnInfo.ConnectionInfo.ServerName = "hjsql01\develop"
logOnInfo.ConnectionInfo.Password = "sa"
logOnInfo.ConnectionInfo.DatabaseName = "Training"
logOnInfo.ConnectionInfo.UserID = "sa"
Dim path As String = Server.MapPath("employee.rpt")
rpdMy0.Load(path)
rpdMy0.Database.Tables(0).ApplyLogOnInfo(logOnInfo)
CrystalReportViewer1.ReportSource = rpdMy0
End Sub
这样就可以加载成功,employee.rpt拉模式的。
Private Sub band()
Dim oRpt As New ReportDocument()
Dim ds As DataSet = Nothing
Dim clsDBProcess As New dbprocess.OledbProcess
Dim strsql As String = ""
strsql = "selece * from employee "
ds = clsDBProcess.GetDataSet(Session("Server"), Session("Database"), strsql)
Dim path As String = Server.MapPath("report/employee.rpt")
oRpt.Load(path)
oRpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = oRpt
End Sub
这样就加载不了报表,report/employee.rpt是一个空白报表。
已经把C:\Program Files\Common Files\Business Objects\2.7\Managed 下所有的文件都COPY到远程服务器网站的BIN目录下,
c.改注册表HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer\PrintJobLimit将PrintJobLimit由75改为0