コード例 #1
0
        void MER_SEA()
        {
            this.Text = "Seafarer's Medical Examination Certificate Print-Out";
            R_Seabase_MER1.Load(@"C:\Report\R_Seabase_MER.rpt");
            crystalReportViewer7.ReportSource     = R_Seabase_MER1;
            crystalReportViewer7.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";
            ClassSql a = new ClassSql();
            TextBox  txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox();

            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_Seabase_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_Seabase_MER1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;
            //R_Seabase_MER1.Refresh();
            crystalReportViewer7.RefreshReport();
            RemoveTab(crystalReportViewer7);

            // this.Text = "Seafarer's Medical Examination Certificate Print-Out";
            Seabase_MER_Page21.Load(@"C:\Report\Seabase_MER_Page2.rpt");
            crystalReportViewer14.ReportSource     = Seabase_MER_Page21;
            crystalReportViewer14.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";

            //R_Seabase_MER1.Refresh();
            crystalReportViewer14.RefreshReport();
            RemoveTab(crystalReportViewer14);

            // wizard1.SelectedTab = tabPage7;
        }
コード例 #2
0
        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            R_Seabase_MER1.Load(@"C:\Report\R_Seabase_MER.rpt");
            crystalReportViewer4.ReportSource     = R_Seabase_MER1;
            crystalReportViewer4.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";
            ClassSql a = new ClassSql();
            TextBox  txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox();

            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_Seabase_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_Seabase_MER1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;
            // /R_Seabase_MER1.Refresh();
            crystalReportViewer4.RefreshReport();
            RemoveTab(crystalReportViewer4);

            wizard1.SelectedTab = tabPage4;

            tabControl1.SelectedTab = tabPage5;

            Seabase_MER_Page21.Load(@"C:\Report\Seabase_MER_Page2.rpt");
            crystalReportViewer5.ReportSource     = Seabase_MER_Page21;
            crystalReportViewer5.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";
            //ClassSql a = new ClassSql();
            //TextBox txt_ForNo2 = new TextBox(); TextBox txt_RevNo2 = new TextBox();
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '13'", txt_RevNo, "Revision");
            //TextObject FormNo2 = (TextObject)Seabase_MER_Page21.ReportDefinition.ReportObjects["txt_formNo"];
            //TextObject RevNo2 = (TextObject)Seabase_MER_Page21.ReportDefinition.ReportObjects["txt_RevNo"];
            //FormNo2.Text = txt_ForNo2.Text;
            //RevNo2.Text = txt_RevNo2.Text;

            // /R_Seabase_MER1.Refresh();
            crystalReportViewer5.RefreshReport();
            RemoveTab(crystalReportViewer5);
            // wizard1.SelectedTab = tabPage4;
        }