private void bgWLive_DoWork(object sender, DoWorkEventArgs e) { switch (Section) { case 1: RptInfo.ViewReport(LiveReportViewer, Section); break; case 2: RptInfo.ViewReport(LiveReportViewer, Section, strSearch); break; case 3: if (ShowReg) { RptInfo.ViewReport(LiveReportViewer, Section, strSearch, RegNo); } else { if (ActiveReport) { if (TT) { RptInfo.ViewReport(LiveReportViewer, Section, strSearch, SearchStartDate, SearchEndDate); } else if (FT) { RptInfo.ViewReport(LiveReportViewer, Section, strSearch, SearchStartDate, SearchStartDate); } else if (TF) { RptInfo.ViewReport(LiveReportViewer, Section, strSearch, SearchEndDate, SearchEndDate); } else if (FF) { RptInfo.ViewReportA(LiveReportViewer, Section, strSearch); } } else { switch (ReportType) { case 3: RptInfo.ViewReport(LiveReportViewer, Section, strSearch, UseParam, Param); break; case 4: RptInfo.ViewReport(LiveReportViewer, Section, strSearch, UseParam, Param, Param2); break; default: RptInfo.ViewReport(LiveReportViewer, Section, strSearch); break; } } } break; case 4: RptInfo.ViewReportRegNo(LiveReportViewer, Section, RegNo); break; } }