我在winform制作了一個(gè)名為PredictOrderReport.rdlc的報(bào)表(其中的字段來自數(shù)據(jù)集DateSetPredictOrderReport),并使用了ReportView把這個(gè)報(bào)表添加進(jìn)去了(這里顯示的數(shù)據(jù)集是DateSetPredictOrderReport)?,F(xiàn)在在ReportView的代碼中如下面所寫,可打印出來的報(bào)表除了固定下來的內(nèi)容外全是空的(固定的內(nèi)容也很模糊看不清,不知道什么原因)。請高手幫忙解釋下,代碼如下: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是報(bào)表所在的程序名稱,不知道是不是寫這個(gè)還是得寫數(shù)據(jù)集DateSetPredictOrderReport;dtPredictOrderReports是有數(shù)據(jù)內(nèi)容的,將他作為數(shù)據(jù)源給這個(gè)報(bào)表。這些疑問還請高手們幫忙解釋下,謝謝了!? 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);? }? }
高手進(jìn)??!rdlc報(bào)表打印出來沒有內(nèi)容,求助!
哆啦的時(shí)光機(jī)
2018-12-07 02:33:00