DevExpress控件使用交流,DevExpress中国社区Dev联系电话 联系电话:023-68661681

DevExpress WPF 15.2代码示例:如何打印报表

来源:DevExpress   发布时间:2016-03-09   浏览:6867次

XtraReports Suite如何打印报表?


语言:C#   支持版本:v2010.1.4-v2015.2.7

using System;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;

namespace PrintReport {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e) {
            // Create a report instance, assigned to a Print Tool.
            ReportPrintTool pt = new ReportPrintTool(new XtraReport1());

            // Invoke the Print dialog.
            pt.PrintDialog();

            // Send the report to the default printer.
            pt.Print();

            // Send the report to the specified printer.
            pt.Print("myPrinter");
        }

    }
}

本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/629.html
在线
客服
微信
QQ 电话
023-68661681
返回
顶部