private void PrintButton_Click( object sender, EventArgs e )
        {
            foreach ( TabPage curPage in ReportTabControl.TabPages ) {
                curPage.Select();
                curPage.Focus();
                curPage.Show();
            }
            ReportTabControl.TabPages[0].Select();
            ReportTabControl.TabPages[0].Focus();
            ReportTabControl.TabPages[0].Show();

            FormReportPrinter curFormPrint = new FormReportPrinter( ReportTabControl );
            curFormPrint.ReportHeader = "Tow Boat Use and Performance Document" + sanctionIdTextBox.Text + " - " + nameTextBox.Text;
            curFormPrint.CenterHeaderOnPage = true;
            curFormPrint.ReportHeaderFont = new Font( "Arial", 12, FontStyle.Bold, GraphicsUnit.Point );
            curFormPrint.ReportHeaderTextColor = Color.Black;

            curFormPrint.BottomMargin = 75;
            curFormPrint.TopMargin = 50;
            curFormPrint.LeftMargin = 50;
            curFormPrint.RightMargin = 50;

            curFormPrint.Print();
        }
        public void PrintButton_Click( object sender, EventArgs e )
        {
            foreach ( TabPage curPage in ReportTabControl.TabPages ) {
                curPage.Select();
                curPage.Focus();
                curPage.Show();
            }
            ReportTabControl.TabPages[0].Select();
            ReportTabControl.TabPages[0].Focus();
            ReportTabControl.TabPages[0].Show();

            FormReportPrinter curFormPrint = new FormReportPrinter( ReportTabControl );
            curFormPrint.ReportName = sanctionIdTextBox.Text + "SD";
            curFormPrint.ReportHeader = "Safety Director's Report for " + sanctionIdTextBox.Text + " - " + nameTextBox.Text;
            curFormPrint.CenterHeaderOnPage = true;
            curFormPrint.ReportHeaderFont = new Font( "Arial", 12, FontStyle.Bold, GraphicsUnit.Point );
            curFormPrint.ReportHeaderTextColor = Color.Black;

            curFormPrint.BottomMargin = 25;
            curFormPrint.TopMargin = 50;
            curFormPrint.LeftMargin = 25;
            curFormPrint.RightMargin = 25;

            curFormPrint.Print(false);
        }
        public void PrintButton_Click( object sender, EventArgs e )
        {
            String curPath = Properties.Settings.Default.ExportDirectory;
            Directory.SetCurrentDirectory( curPath );
            if ( myDataValid ) {
                foreach ( TabPage curPage in ReportTabControl.TabPages ) {
                    curPage.Select();
                    curPage.Focus();
                    curPage.Show();
                }
                ReportTabControl.TabPages[0].Select();
                ReportTabControl.TabPages[0].Focus();
                ReportTabControl.TabPages[0].Show();

                FormReportPrinter curFormPrint = new FormReportPrinter( ReportTabControl );
                curFormPrint.ReportName = (String)myTourRow["SanctionId"] + "CJ";
                curFormPrint.ReportHeader = "Chief Judge Report for " + sanctionIdTextBox.Text + " - " + nameTextBox.Text;
                curFormPrint.CenterHeaderOnPage = true;
                curFormPrint.ReportHeaderFont = new Font( "Arial", 12, FontStyle.Bold, GraphicsUnit.Point );
                curFormPrint.ReportHeaderTextColor = Color.Black;

                curFormPrint.BottomMargin = 75;
                curFormPrint.TopMargin = 50;
                curFormPrint.LeftMargin = 50;
                curFormPrint.RightMargin = 50;

                curFormPrint.Print(false);
            } else {
                MessageBox.Show( "Report can not be produced because some data is missing or invalid" );
            }
        }
        public void PrintButton_Click(object sender, EventArgs e)
        {
            int curPageNum = 0;
            FormReportPrinter curFormPrint = new FormReportPrinter( ReportTabControl );
            curFormPrint.ReportHeader = "Tow Boat Use and Performance Document" + sanctionIdTextBox.Text + " - " + nameTextBox.Text;
            curFormPrint.ReportName = sanctionIdTextBox.Text + "TU";

            curFormPrint.CenterHeaderOnPage = true;
            curFormPrint.ReportHeaderFont = new Font( "Arial", 12, FontStyle.Bold, GraphicsUnit.Point );
            curFormPrint.ReportHeaderTextColor = Color.Black;

            curFormPrint.BottomMargin = 40;
            curFormPrint.TopMargin = 50;
            curFormPrint.LeftMargin = 50;
            curFormPrint.RightMargin = 50;

            if ( myBoatUseDataTable.Rows.Count > 0 ) {
                for ( myBoatRowIdx = 0; myBoatRowIdx < myBoatUseDataTable.Rows.Count; myBoatRowIdx += 5 ) {
                    TowboatUseLoad( myBoatRowIdx );

                    foreach ( TabPage curPage in ReportTabControl.TabPages ) {
                        curPage.Select();
                        curPage.Focus();
                        curPage.Show();
                    }
                    ReportTabControl.TabPages[0].Select();
                    ReportTabControl.TabPages[0].Focus();
                    ReportTabControl.TabPages[0].Show();

                    if (myBoatRowIdx > 0) {
                        curPageNum = ( myBoatRowIdx / 5) + 1;
                        curFormPrint.ReportName = sanctionIdTextBox.Text + "TU-P" + curPageNum.ToString();
                    }
                    curFormPrint.Print( false );
                }
            } else {
                ReportTabControl.TabPages[0].Select();
                ReportTabControl.TabPages[0].Focus();
                ReportTabControl.TabPages[0].Show();
                curFormPrint.Print();
            }
        }