async void Psych_Eval_form() { // DataClasses1DataContext db = new DataClasses1DataContext(Properties.Settings.Default.MyConString); // DataTable dt = new ds_report1.t_psychology1DataTable(); this.Text = "Medical Examination Certificate Print-Out"; Psych_Eval Psych_Eval1 = new Psych_Eval(); await Task.Run(() => { // var list = db.t_psychology1(this.Tag.ToString()).ToList(); //foreach (var i in list) //{ // dt.Rows.Add( // ); //} //this.Invoke(new Action(() => { Psych_Eval1.SetDataSource(dt); })); //Psych_Eval1.Load(@"C:\Report\Psych_Eval.rpt"); IniFile ini = new IniFile(ClassSql.MMS_Path); TextObject FormNo = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_formNo"]; TextObject RevNo = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_RevNo"]; TextObject PsychoMet = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_psychoMet"]; TextObject TitleLicMed = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txtTititlePrcMedtech"]; TextObject ValidityMedTech = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txtvalidity_Medtech"]; TextObject ptr_medtech = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_ptr_medtech"]; TextObject Psychologist = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_psychologist"]; TextObject TitleLicPath = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txtTititlePrcPatho"]; TextObject ValidityPatho = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txtvalidity_Patho"]; TextObject PRTPatho = (TextObject)Psych_Eval1.ReportDefinition.ReportObjects["txt_ptr_patho"]; FormNo.Text = ini.IniReadValue("FORM", "Psycho_Evaluation"); RevNo.Text = ini.IniReadValue("REVISION", "Psycho_Evaluation"); PsychoMet.Text = ini.IniReadValue("MEDICAL", "Psychometrician"); TitleLicMed.Text = "Lic No.: " + ini.IniReadValue("MEDICAL", "Psychometrician_license"); ValidityMedTech.Text = "Lic. Vilidity: " + ini.IniReadValue("MEDICAL", "Psychometrician_Validity"); ptr_medtech.Text = "PTR Nos.: " + ini.IniReadValue("MEDICAL", "Psychometrician_ptr"); Psychologist.Text = ini.IniReadValue("MEDICAL", "Psychologist"); TitleLicPath.Text = "Lic No.: " + ini.IniReadValue("MEDICAL", "Psychologist_license"); ValidityPatho.Text = "Lic. VAlidity: " + ini.IniReadValue("MEDICAL", "Psychologist_Validity"); PRTPatho.Text = "PTR Nos: " + ini.IniReadValue("MEDICAL", "Psychologist_Ptr"); }); /////////////// VIEWER_Psycho.ReportSource = Psych_Eval1; VIEWER_Psycho.RefreshReport(); RemoveTab(VIEWER_Psycho); }
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(); } }