2017-07-06 83 views
0

當我運行它時,報告顯示空白頁面。數據表有信息,但沒有它顯示在頁面上:報告在瀏覽器中顯示空白頁面

enter image description here

存儲過程獲取數據到數據表:

enter image description here

rptDoc = new ReportDocument(); 
DataTable DTReport = new DataTable(); 

SqlParameter[] param = new SqlParameter[2]; 
param[0] = new SqlParameter("@Number", SqlDbType.VarChar, 50); 
param[0].Value = Session["PrintNumber"].ToString(); 
param[1] = new SqlParameter("@LOTS", SqlDbType.VarChar, 255); 
param[1].Value = Lots.Trim(); 
DTReport = objdAccess.ExecuteSpDataTable("SPfetch", param); 
CrystalReportViewer1.ID = "DeliveryNote-" + Session["PrintNumber"].ToString(); 
string Report = "~/Reports/Report.rpt"; 
rptDoc.Load(Server.MapPath(Report)); 
rptDoc.SetDataSource(DTReport); 
rptDoc.SetParameterValue("@number", Session["PrintNumber"].ToString()); 
rptDoc.SetParameterValue("@LOTS", Lots.Trim()); 

CrystalReportViewer1.ReportSource = rptDoc; 
CrystalReportViewer1.DataBind(); 
CrystalReportViewer1.Visible = true; 
+0

您是否嘗試在瀏覽器/應用程序中運行之前預覽它? – Sujith

回答

0

我只是說「crystalreportviewers13 「這個文件夾到我的項目文件夾,它解決了這個問題。

相關問題