예제 #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //内嵌打开。
            EAS.GReport.Controls.GDisplayViewer printViewer = new EAS.GReport.Controls.GDisplayViewer();
            printViewer.ReportID   = new Guid("598FAEFA-F8B8-44FB-9DCD-3EA1C3EDEA00");
            printViewer.DataObject = this.drugInList;
            EAS.Application.Instance.OpenModule(printViewer);

            //独立打开
            EAS.GReport.Controls.PrintViewDialog viewDialog = new EAS.GReport.Controls.PrintViewDialog();
            viewDialog.WindowState = FormWindowState.Maximized;
            viewDialog.ReportID    = new Guid("598FAEFA-F8B8-44FB-9DCD-3EA1C3EDEA00");
            viewDialog.DataObject  = this.drugInList;
            viewDialog.ShowDialog(this.ParentForm);
        }
예제 #2
0
        private void tsbPrint_Click(object sender, EventArgs e)
        {
            //验证按钮级别权限。
            if (!EAS.Application.Instance.Demand(new Guid("6a185217-34de-4fe7-9ed5-c2cc49ba432c")))
            {
                return;
            }

            if (this.dictList != null)
            {
                EAS.GReport.Controls.PrintViewDialog ViewDialog = new EAS.GReport.Controls.PrintViewDialog();
                ViewDialog.ReportID      = new Guid("F29C4C91-0791-4116-BE26-3A2A88F30A2A");
                ViewDialog.DataObject    = this.dictList;
                ViewDialog.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                ViewDialog.WindowState   = System.Windows.Forms.FormWindowState.Maximized;
                ViewDialog.ShowDialog();
            }
        }