void Load_ULtraSound() { IniFile ini = new IniFile(ClassSql.MMS_Path); R_Ultrasound1.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database")); this.Text = "Ultra Sound Report Print-Out"; R_Ultrasound1.Load(@"C:\Report\R_Ultrasound.rpt"); Viewer_ULTZ.ReportSource = R_Ultrasound1; Viewer_ULTZ.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 = '19'", txt_ForNo, "Form"); //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '19'", txt_RevNo, "Revision"); //IniFile ini = new IniFile(ClassSql.MMS_Path); TextObject FormNo = (TextObject)R_Ultrasound1.ReportDefinition.ReportObjects["txt_formNo"]; TextObject RevNo = (TextObject)R_Ultrasound1.ReportDefinition.ReportObjects["txt_RevNo"]; FormNo.Text = ini.IniReadValue("FORM", "Ultrasound"); RevNo.Text = ini.IniReadValue("REVISION", "Ultrasound"); Viewer_ULTZ.RefreshReport(); RemoveTab(Viewer_ULTZ); // wizard1.SelectedTab = tabPage2; }
void Load_ULtraSound() { this.Text = "Ultra Sound Report Print-Out"; R_Ultrasound1.Load(@"C:\Report\R_Ultrasound.rpt"); crystalReportViewer2.ReportSource = R_Ultrasound1; crystalReportViewer2.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 = '19'", txt_ForNo, "Form"); a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '19'", txt_RevNo, "Revision"); TextObject FormNo = (TextObject)R_Ultrasound1.ReportDefinition.ReportObjects["txt_formNo"]; TextObject RevNo = (TextObject)R_Ultrasound1.ReportDefinition.ReportObjects["txt_RevNo"]; FormNo.Text = txt_ForNo.Text; RevNo.Text = txt_RevNo.Text; crystalReportViewer2.RefreshReport(); RemoveTab(crystalReportViewer2); // wizard1.SelectedTab = tabPage2; }