亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

高手進??!rdlc報表打印出來沒有內容,求助!

高手進!!rdlc報表打印出來沒有內容,求助!

哆啦的時光機 2018-12-07 02:33:00
我在winform制作了一個名為PredictOrderReport.rdlc的報表(其中的字段來自數據集DateSetPredictOrderReport),并使用了ReportView把這個報表添加進去了(這里顯示的數據集是DateSetPredictOrderReport)。現在在ReportView的代碼中如下面所寫,可打印出來的報表除了固定下來的內容外全是空的(固定的內容也很模糊看不清,不知道什么原因)。請高手幫忙解釋下,代碼如下:PredictOrderReportView_Load(object sender, EventArgs e)? {? this.reportViewer1.RefreshReport();? }? ?public partial class PredictOrderReportView : Form? {? private DataTable dtPredictOrderReports;? public PredictOrderReportView(DataTable dtShipmentReport)? {? InitializeComponent();? this.dtPredictOrderReports = dtShipmentReport;? LocalReport localReport = this.reportViewer1.LocalReport;? localReport.Refresh();? localReport.ReportEmbeddedResource = "Leis.View.Operation.HawbDeparture.PredictOrderReport.rdlc";? localReport.DataSources.Add(new ReportDataSource("PredictOrderReport", dtPredictOrderReports));//這里的PredictOrderReport是報表所在的程序名稱,不知道是不是寫這個還是得寫數據集DateSetPredictOrderReport;dtPredictOrderReports是有數據內容的,將他作為數據源給這個報表。這些疑問還請高手們幫忙解釋下,謝謝了!? localReport.Refresh();? PrintLable(localReport);? }? public void PrintLable(LocalReport lreport)? {? if (lreport == null) return;? ReportPrint reportPrint = new ReportPrint(lreport);? PrintController printController = new StandardPrintController();? reportPrint.PrintController = printController;? reportPrint.PageHeight = 90;? reportPrint.PageWidth = 110;? reportPrint.MarginLeft = 0.2;? try? {? reportPrint.Print(); ? ? }? catch (Exception e)? {? throw (e);? }? }
查看完整描述

2 回答

?
白板的微信

TA貢獻1883條經驗 獲得超3個贊

dtPredictOrderReports這個是空的

查看完整回答
反對 回復 2019-01-21
?
Smart貓小萌

TA貢獻1911條經驗 獲得超7個贊

自己解決了!

查看完整回答
反對 回復 2019-01-21
  • 2 回答
  • 0 關注
  • 463 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號