日期:2014-05-18 浏览次数:21128 次
RptReceipt rpt = new RptReceipt(dtCurrent); //dtCurrent是DataTable rpt.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter; rpt.PaperKind = System.Drawing.Printing.PaperKind.Custom; rpt.PrintingSystem.ShowMarginsWarning = false; try { rpt.PageHeight = 1300; rpt.PageWidth = 880; rpt.Margins.Left = 10; rpt.Margins.Right = 10; rpt.Margins.Top = 10; rpt.Margins.Bottom = 10; } catch { PrintDocument pd = new PrintDocument(); rpt.PageHeight = pd.DefaultPageSettings.PaperSize.Height; rpt.PageWidth = pd.DefaultPageSettings.PaperSize.Width; } rpt.Print();