示例#1
0
        //浏览或者打印页时响应的事件
        private void _PrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            Graphics g = e.Graphics;

            //nick 2006-01-02 如果希望每页只绘制一次的话,那么需要在这里进行判断,以决定在那里进行绘制。
            _DrawObj.DrawReportSection(g, DIYReport.SectionType.ReportTitle);
            _DrawObj.DrawReportSection(g, DIYReport.SectionType.PageHead);
            bool more = _DrawObj.DrawReportSection(g, DIYReport.SectionType.Detail);

            if (more == true)
            {
                _DrawObj.DrawReportSection(g, DIYReport.SectionType.PageFooter);
                e.HasMorePages = true;
                _DrawObj.PageNumber++;
            }
            else
            {
                _DrawObj.DrawReportSection(g, DIYReport.SectionType.PageFooter);
                _DrawObj.DrawReportSection(g, DIYReport.SectionType.ReportBottom);
            }
        }
示例#2
0
 private void linkDoc_CreateReportHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e)
 {
     //string pag = e.Graph.PrintingSystem.PageSettings.PaperName    ;
     _DrawObj.DrawReportSection(e.Graph, DIYReport.SectionType.ReportTitle);
 }