void Load_MLC() { this.Text = "Seafarer's Medical Examination Certificate Print-Out"; R_Seabase_MLC R_Seabase_MLC1 = new R_Seabase_MLC(); IniFile ini = new IniFile(ClassSql.MMS_Path); //R_Seabase_MLC1.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database")); //R_Seabase_MLC1.Load(@"C:\Report\R_Seabase_MLC.rpt"); //Viewer_MLC_Sea.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'"; TextObject FormNo = (TextObject)R_Seabase_MLC1.ReportDefinition.ReportObjects["txt_formNo"]; TextObject RevNo = (TextObject)R_Seabase_MLC1.ReportDefinition.ReportObjects["txt_RevNo"]; TextObject CompanyName = (TextObject)R_Seabase_MLC1.ReportDefinition.ReportObjects["txt_CompanyName"]; TextObject CompanyAdd = (TextObject)R_Seabase_MLC1.ReportDefinition.ReportObjects["txt_CompanyAdd"]; TextObject Iso = (TextObject)R_Seabase_MLC1.ReportDefinition.ReportObjects["txt_iso"]; FormNo.Text = ini.IniReadValue("FORM", "Seafarer_MLC"); RevNo.Text = ini.IniReadValue("REVISION", "Seafarer_MLC"); Iso.Text = ini.IniReadValue("ISO", "Seafarer_MLC"); CompanyName.Text = "CENTERPORT MEDICAL SERVICES, INC."; CompanyAdd.Text = "Address 4/F Victoria BLdg. 429 U.N. Ave. Ermita, Manila"; // R_Seabase_MLC1.Refresh(); Viewer_MLC_Sea.ReportSource = R_Seabase_MLC1; Viewer_MLC_Sea.RefreshReport(); RemoveTab(Viewer_MLC_Sea); // wizard1.SelectedTab = tabPage1; }
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(); } }