Crystal报表未显示在服务器上

人气:224 发布:2022-09-22 标签: CrystalReports

问题描述

嗨......我在VS 2010中使用以下代码创建Crystal Report 13 .... CrystalReportViewer1.ToolbarStyle.Width = new Unit(800px ); ReportDocument cryRpt = new ReportDocument(); TableLogOnInfos crtableLogoninfos = new TableLogOnInfos(); TableLogOnInfo crtableLogoninfo = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); Tables CrTables; cryRpt.Load(Server.MapPath(@〜/ ADMIN / FlatPaymentReceipt.rpt)); crConnectionInfo.ServerName =000.00.00.000; crConnectionInfo.DatabaseName =testdatabase; crConnectionInfo.UserID =testusername; crConnectionInfo.Password =testpassword; CrTables =哭Rpt.Database.Tables; foreach(CrTables中的CrystalDecisions.CrystalReports.Engine.Table CrTable) { crtableLogoninfo = CrTable.LogOnInfo; crtableLogoninfo.ConnectionInfo = crConnectionInfo; CrTable.ApplyLogOnInfo(crtableLogoninfo); } cryRpt.SetParameterValue( 0,Convert.ToInt32(txtBillNo.Text)); CrystalReportViewer1.ReportSource = cryRpt; 它在我的本地服务器上正常工作。 ....但是当我将它上传到服务器上时它会显示任何内容.......它只是回发....

Hi... I was Creating Crystal Report 13 in VS 2010 with following code.... CrystalReportViewer1.ToolbarStyle.Width = new Unit("800px"); ReportDocument cryRpt = new ReportDocument(); TableLogOnInfos crtableLogoninfos = new TableLogOnInfos(); TableLogOnInfo crtableLogoninfo = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); Tables CrTables; cryRpt.Load(Server.MapPath(@"~/ADMIN/FlatPaymentReceipt.rpt")); crConnectionInfo.ServerName = "000.00.00.000"; crConnectionInfo.DatabaseName = "testdatabase"; crConnectionInfo.UserID = "testusername"; crConnectionInfo.Password = "testpassword"; CrTables = cryRpt.Database.Tables; foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables) { crtableLogoninfo = CrTable.LogOnInfo; crtableLogoninfo.ConnectionInfo = crConnectionInfo; CrTable.ApplyLogOnInfo(crtableLogoninfo); } cryRpt.SetParameterValue(0, Convert.ToInt32(txtBillNo.Text)); CrystalReportViewer1.ReportSource = cryRpt; Its work fine on my local server.....but when i upload it on server it doesent show anything.......it just postbacks....

推荐答案

如果你上传sercer意味着你可以在服务器机器上安装水晶视图,这样观察者在水晶报告上非常重要,否则你可以使用报告查看器控件 If u upload sercer mean you can install crystal viewver in server machine so the viewver very important on crystal report other wise you can use Report viewer control

263