Example #1
0
        /// <summary>
        /// Printing event called for every page to be printed.
        /// </summary>
        private void GridDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            // If this is a new printing session, create a new GridPrinter object.
            if (firstPage)
            {
                printer   = new GridPrinter(printingTableName, ref databaseGrid, ref database);
                firstPage = false;
            }

            // Set the current page to be printed.
            printer.SetPage(ref e);

            // Print the page.
            printer.Print();
        }
Example #2
0
        /// <summary>
        /// Print the selected table.
        /// </summary>
        private void gridDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            GridPrinter printer = new GridPrinter(tableName, ref databaseGrid, ref database, e);

            printer.Print();
        }