Ejemplo n.º 1
0
        public void load_Fecal()
        {
            IniFile ini = new IniFile(ClassSql.MMS_Path);

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

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

            TextObject FormNo = (TextObject)R_Fecalysis1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_lab_061.ReportDefinition.ReportObjects["txt_RevNo"];

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


            //R_Urinalysis1.Refresh();
            Viewer_06.RefreshReport();
            RemoveTab(Viewer_06);
            wizard1.SelectedTab = tabPage6;
        }
Ejemplo n.º 2
0
        public void load_Fecal()
        {
            R_Fecalysis1.Load(@"C:\Report\R_Fecalysis.rpt");
            crystalReportViewer6.ReportSource     = R_Fecalysis1;
            crystalReportViewer6.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 = '6'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '2'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)R_Fecalysis1.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_Urinalysis1.Refresh();
            crystalReportViewer6.RefreshReport();
            RemoveTab(crystalReportViewer6);
            wizard1.SelectedTab = tabPage6;
        }
Ejemplo n.º 3
0
 private void button6_Click(object sender, EventArgs e)
 {
     R_Fecalysis1.PrintOptions.PrinterName = Tool.PrinterPath();
     R_Fecalysis1.PrintToPrinter(1, false, 0, 0);
 }