简体   繁体   中英

How do I connect XtraReport to windows form on Visual Studio 2010

如何将XtraReport连接到Visual Studio 2010上的Windows窗体(这也必须使用XtraGrid进行报表查看)

  1. Create Form
  2. Add PrintBarManager
  3. Create new XtraReport

and try to use this code in your Form

    public partial class YourForm : XtraForm
    {
        private YourXtraReport report;
        public YourForm(PrintDocument document )
        {
            InitializeComponent();
            report = new PrintingDocumentReport(document);
        }


        private void PrintingFormLoad(object sender, EventArgs e)
        {
            printControl1.PrintingSystem = report.PrintingSystem;
            report.CreateDocument();
        }
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM