首页 > 代码库 > XtrasReport 标签打印

XtrasReport 标签打印

            var lblList = new List<product_LblPrt_tmp>();            using (JL_MFGEntities ctx = new JL_MFGEntities())            {                lblList=ctx.product_LblPrt_tmp.ToList();            }            var list = ServiceLocator.Fetch<IMaterialService>().GetList();            var rpt = new XtraReport3();            rpt.DataSource = lblList;// new List<Base_Material>() { list[0], list[1] };            rpt.RequestParameters = false;            rpt.PrintingSystem.ShowMarginsWarning = false;            rpt.PrintingSystem.ShowPrintStatusDialog = false;            ReportPrintTool printTool = new ReportPrintTool(rpt);                            printTool.Report.CreateDocument(false);                // Invoke the Ribbon Print Preview form modally,                 // and load the report document into it.                printTool.PrintingSystem.ShowMarginsWarning = false;                printTool.PrintingSystem.AddCommandHandler(new ExportToImageCommandHandler());                var v = printTool.PrintingSystem.GetCommandVisibility(PrintingSystemCommand.PageSetup);                printTool.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.PageSetup, CommandVisibility.None);                printTool.PrintingSystem.ExecCommand(PrintingSystemCommand.ShowFirstPage);                printTool.ShowPreview();
View Code

打印机属性设置页面大小后,

发现在ReportTool里的看到的打印机页面大小不一致。。

各种麻烦

XtrasReport 标签打印