打印的后台设置- private void tsbPrint_Click(object sender, EventArgs e)
- {
- string file_name = @"..\..\RdlReport1.rdlx";
- GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name));
- pageReport.Document.LocateDataSource += new LocateDataSourceEventHandler(LocateData);
- pageReport.Document.Printer.DefaultPageSettings.Margins.Bottom = 0;
- pageReport.Document.Printer.DefaultPageSettings.Margins.Left = 0;
- pageReport.Document.Printer.DefaultPageSettings.Margins.Right = 0;
- pageReport.Document.Printer.DefaultPageSettings.Margins.Top = 0;
- pageReport.Document.Printer.PaperSize.RawKind = 0;
- pageReport.Document.Printer.PaperSize.Width = 14;
- pageReport.Document.Printer.PaperSize.Height = 20;
- pageReport.Document.Printer.PrinterName = "打印机名";
- GrapeCity.ActiveReports.PrintExtension.Print(_document, true, true);
- }
复制代码
|