void MER_LAND() { this.Text = "Landbase Medical Examination Certificate Print-Out"; IniFile ini = new IniFile(ClassSql.MMS_Path); R_Landbade_MER1.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database")); R_Landbade_MER1.Load(@"C:\Report\R_Landbade_MER.rpt"); MER_Land1.ReportSource = R_Landbade_MER1; MER_Land1.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'"; //ClassSql a = new ClassSql(); //TextBox txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox(); TextBox txt_ISO = new TextBox(); //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ForNo, "Form"); //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_RevNo, "Revision"); //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ISO, "ISO"); TextObject FormNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_formNo"]; TextObject RevNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_RevNo"]; TextObject Iso = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_iso"]; FormNo.Text = ini.IniReadValue("FORM", "Landbase_MER"); RevNo.Text = ini.IniReadValue("REVISION", "Landbase_MER"); Iso.Text = ini.IniReadValue("ISO", "Landbase_MER"); MER_Land1.RefreshReport(); RemoveTab(MER_Land1); LandBase_MER21.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database")); // this.Text = "Landbase Medical Examination Certificate Print-Out"; LandBase_MER21.Load(@"C:\Report\LandBase_MER2.rpt"); MER_Land2.ReportSource = LandBase_MER21; MER_Land2.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'"; //crystalReportViewer11.RefreshReport(); RemoveTab(MER_Land2); }
void PrintNow() { if (wizard1.SelectedIndex == 0) { Viewer_MLC_Sea.PrintReport(); } else if (wizard1.SelectedIndex == 1) { Viewer_ULTZ.PrintReport(); } else if (wizard1.SelectedIndex == 2) { Viewer_XRAY.PrintReport(); } else if (wizard1.SelectedIndex == 3) { Viewer_HIV.PrintReport(); } else if (wizard1.SelectedIndex == 4) { Viewer_summary_Sea.PrintReport(); } else if (wizard1.SelectedIndex == 5) { if (tabControl1.SelectedIndex == 0) { Viewer_MER_P1.PrintReport(); } else if (tabControl1.SelectedIndex == 1) { Viewer_MER_P2.PrintReport(); } } else if (wizard1.SelectedIndex == 6) { Viewer_Detailed_Sea.PrintReport(); } else if (wizard1.SelectedIndex == 7) { Viewer_Summary.PrintReport(); } else if (wizard1.SelectedIndex == 8) { if (tabControl_Landbase.SelectedIndex == 0) { MER_Land1.PrintReport(); } else if (tabControl_Landbase.SelectedIndex == 1) { MER_Land2.PrintReport(); } } else if (wizard1.SelectedIndex == 9) { Viewer_land_detailed.PrintReport(); } else if (wizard1.SelectedIndex == 10) { VIEWER_LAND_MLC.PrintReport(); } else if (wizard1.SelectedIndex == 11) { VIEWER_PsychEval.PrintReport(); } else if (wizard1.SelectedIndex == 12) { VIEWER_Psycho.PrintReport(); } else if (wizard1.SelectedIndex == 13) { visit_reportViewer.PrintReport(); } }