private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            Graphics g = e.Graphics;

            DrawTopLabel(g);
            bool more = gridPrinter.DrawDataGrid(g);

            if (more == true)
            {
                e.HasMorePages = true;
                gridPrinter.Increment_Page();
            }
        }
        private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
        {
            try
            {
                Graphics g = e.Graphics;

                Font  headerFont  = new Font("Tahoma", 14, FontStyle.Bold);
                Brush headerBrush = new SolidBrush(Color.Black);
                g.DrawString("Ad Hoc " + SobekCM_Library_Settings.System_Abbreviation + " Report", headerFont, headerBrush, 120, 30);

                bool more = gridPrinterShowAllRows ? gridPrinter.DrawDataGrid(g) : gridPrinter.DrawDataGrid_SelectedRows(g);
                if (more)
                {
                    e.HasMorePages = true;
                    gridPrinter.Increment_Page();
                }
            }
            catch
            {
                MessageBox.Show("Error encountered while printing!       ", "I/O Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }