Exemplo n.º 1
0
        public void LoadHema()
        {
            R_HemaLab011.Load(@"C:\Report\R_HemaLab01.rpt");
            crystalReportViewer3.ReportSource     = R_HemaLab011;
            crystalReportViewer3.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 = '3'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '2'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["txt_formNo"];

            //TextObject RevNo = (TextObject)R_lab_061.ReportDefinition.ReportObjects["txt_RevNo"];
            FormNo.Text = txt_ForNo.Text;
            //RevNo.Text = txt_RevNo.Text;

            //R_HemaLab011.Refresh();
            crystalReportViewer3.RefreshReport();
            RemoveTab(crystalReportViewer3);
            wizard1.SelectedTab = tabPage3;
        }
Exemplo n.º 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     R_HemaLab011.PrintOptions.PrinterName = Tool.PrinterPath();
     R_HemaLab011.PrintToPrinter(1, false, 0, 0);
 }
Exemplo n.º 3
0
        public void LoadHema()
        {
            IniFile ini = new IniFile(ClassSql.MMS_Path);

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

            R_HemaLab011.Load(@"C:\Report\R_HemaLab01.rpt");
            Viewer_03.ReportSource     = R_HemaLab011;
            Viewer_03.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 = '3'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '2'", txt_RevNo, "Revision");

            TextObject FormNo = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["txt_rev"];

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

            TextObject aa = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["a"];
            TextObject b  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["b"];
            TextObject c  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["c"];
            TextObject d  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["d"];
            TextObject e  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["e"];
            TextObject f  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["f"];
            TextObject g  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["g"];
            TextObject h  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["h"];
            TextObject i  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["i"];
            TextObject j  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["j"];
            TextObject k  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["k"];
            TextObject l  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["l"];
            TextObject m  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["m"];
            TextObject n  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["n"];
            TextObject o  = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["o"];

            //TextObject p = (TextObject)R_HemaLab011.ReportDefinition.ReportObjects["p"];

            aa.Text = ini.IniReadValue("NormalValue", "hemoglobin") + "gm/dl";
            b.Text  = ini.IniReadValue("NormalValue", "hematocrit") + "vol%";
            c.Text  = ini.IniReadValue("NormalValue", "RBC") + " m/cumm";
            d.Text  = ini.IniReadValue("NormalValue", "WBC") + " /cumm";
            e.Text  = ini.IniReadValue("NormalValue", "Platelet") + "/cumm";
            f.Text  = ini.IniReadValue("NormalValue", "BloodType");
            //g.Text = ini.IniReadValue("NormalValue", "ESR") + "mm/hr(MALE)/" + ini.IniReadValue("NormalValue", "textBox1") + "mm/hr(FEMALE)";
            g.Text = ini.IniReadValue("NormalValue", "Lympho") + "%";
            h.Text = ini.IniReadValue("NormalValue", "Segmenters") + "%";
            i.Text = ini.IniReadValue("NormalValue", "Easinophils") + "%";
            j.Text = ini.IniReadValue("NormalValue", "MonoCytes") + "%";
            k.Text = ini.IniReadValue("NormalValue", "Myelocytes");
            l.Text = ini.IniReadValue("NormalValue", "Juveniles");
            m.Text = ini.IniReadValue("NormalValue", "StabCells") + "%";
            n.Text = ini.IniReadValue("NormalValue", "BasoPhils") + "%";
            o.Text = ini.IniReadValue("NormalValue", "Hema_Other");

            //R_HemaLab011.Refresh();
            Viewer_03.RefreshReport();
            RemoveTab(Viewer_03);
            wizard1.SelectedTab = tabPage3;
        }