Example #1
0
        private void PrintReport(Graphics g, ReportPageUI reportPageUI)
        {
            isPrinting = true;
            this.Invoke(new Action(() =>
            {
                //reportPageUI.DrawPageHeadAndTail(g);

                for (int i = reportPageUI.Controls.Count - 1; i >= 0; i--)
                {
                    ReportCtrl rCtrl = reportPageUI.Controls[i] as ReportCtrl;
                    if (rCtrl != null)
                    {
                        rCtrl.IsPrint = true;
                        rCtrl.Draw(g, rCtrl.ReportItem.Bounds);
                        rCtrl.IsPrint = false;
                    }
                }
            }));
            isPrinting = false;
        }