コード例 #1
0
        void Load_HIV()
        {
            this.Text = "Human Immunodeficiency Virus (HIV) Screening Certificate";
            R_HIV1.Load(@"C:\Report\R_HIV.rpt");
            crystalReportViewer4.ReportSource     = R_HIV1;
            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 = '7'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '7'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_HIV1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_HIV1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;

            crystalReportViewer4.RefreshReport();
            RemoveTab(crystalReportViewer4);
            // wizard1.SelectedTab = tabPage4;
        }
コード例 #2
0
        void Load_HIV()
        {
            IniFile ini = new IniFile(ClassSql.MMS_Path);

            R_HIV1.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database"));

            this.Text = "Human Immunodeficiency Virus (HIV) Screening Certificate";
            R_HIV1.Load(@"C:\Report\R_HIV.rpt");
            Viewer_HIV.ReportSource     = R_HIV1;
            Viewer_HIV.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 = '7'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '7'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_HIV1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_HIV1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = ini.IniReadValue("FORM", "HIV");
            RevNo.Text  = ini.IniReadValue("REVISION", "HIV");

            Viewer_HIV.RefreshReport();
            RemoveTab(Viewer_HIV);
            // wizard1.SelectedTab = tabPage4;
        }