private void btnviewreport_Click(object sender, EventArgs e) { int noofsite = 0; string logic = string.Empty; if (chknoofsite.Checked) { if (txtnoofsite.Text != string.Empty) noofsite = int.Parse(txtnoofsite.Text); if (comlogic.Text != string.Empty) logic = comlogic.Text; } SqlParameter rpNoofsite = new SqlParameter(); rpNoofsite.ParameterName = "noofsite"; rpNoofsite.Value = noofsite; SqlParameter rplogic = new SqlParameter(); rplogic.ParameterName = "logic"; rplogic.Value = logic; sqlParams.Clear(); sqlParams.Add(rpNoofsite); sqlParams.Add(rplogic); DataSet _rDataSet=ReportRepository.GetDataSet(sqlConnection,sqlParams,"spRegionList"); if(chknoofsite.Checked) filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptRegionWithSiteCount))); else filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptRegion))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void btnViewreport_Click(object sender, EventArgs e) { int producttype = 0; int testingarea = 0; if (comTestarea.SelectedValue.ToString() != "-1") testingarea = int.Parse(comTestarea.SelectedValue.ToString()); if (comCategory.SelectedValue.ToString() != "-1") producttype = int.Parse(comCategory.SelectedValue.ToString()); SqlParameter rpproducttype = new SqlParameter(); rpproducttype.ParameterName = "producttype"; rpproducttype.Value = producttype; SqlParameter rptestingarea = new SqlParameter(); rptestingarea.ParameterName = "testingarea"; rptestingarea.Value = testingarea; sqlParams.Clear(); sqlParams.Add(rpproducttype); sqlParams.Add(rptestingarea); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spProductUsageList"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptProductUsageList))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void btnViewreport_Click(object sender, EventArgs e) { int region = 0; int category = 0; if (comRegion.SelectedValue.ToString() != "-1") region = int.Parse(comRegion.SelectedValue.ToString()); if (comCategory.SelectedValue.ToString() != "-1") category = int.Parse(comCategory.SelectedValue.ToString()); SqlParameter rpregion = new SqlParameter(); rpregion.ParameterName = "region"; rpregion.Value = region; SqlParameter rpcategory = new SqlParameter(); rpcategory.ParameterName = "category"; rpcategory.Value = category; sqlParams.Clear(); sqlParams.Add(rpregion); sqlParams.Add(rpcategory); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams,"spSiteList"); if (chkworkingday.Checked) filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptSitewithworkingdays))); else filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptSite))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void FrmReportLoader_Load(object sender, EventArgs e) { if (_Report == OReports.ForecastResultSummary) { FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _parameters); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); } }
private void buttonLaunchReport_Click(object sender, EventArgs e) { try { if (comMethodologey.Text == MethodologyEnum.DEMOGRAPHIC.ToString()) { _mforecast = LqtUtil.GetComboBoxValue <MorbidityForecast>(cbomforecast); LoadReport(cboreport.SelectedIndex); } else { FileInfo filinfo = null; _finfo = LqtUtil.GetComboBoxValue <ForecastInfo>(comForecastinfo); List <ReportParameter> param = new List <ReportParameter>(); ReportParameter finfo = new ReportParameter("ForecastId", _finfo.Id.ToString()); param.Add(finfo); FillReportDataSet(); if (rdosite.Checked) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ServiceQSummary))); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.FullQSummary))); } _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); } } catch (Exception ex) { new FrmShowError(new ExceptionStatus() { message = "", ex = ex }).ShowDialog(); } }
private void btnViewreport_Click(object sender, EventArgs e) { int testingarea = 0; if (comTestarea.SelectedValue.ToString() != "-1") testingarea = int.Parse(comTestarea.SelectedValue.ToString()); SqlParameter rptestingarea = new SqlParameter(); rptestingarea.ParameterName = "testingarea"; rptestingarea.Value = testingarea; sqlParams.Clear(); sqlParams.Add(rptestingarea); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spInstrumentList"); if(chkcontroltest.Checked) filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptInstrumentListwithControlTdays))); else filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptInstrumentList))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void button7_Click(object sender, EventArgs e) { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillReportDataSetch(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ChemistryNumberofTestForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); }
private void btnviewreport_Click(object sender, EventArgs e) { int SforecastId = -1; int CforecastId = -1; int DforecastId = -1; if (cobservice.SelectedValue.ToString() != "-1") SforecastId = int.Parse(cobservice.SelectedValue.ToString()); if (cobconsumption.SelectedValue.ToString() != "-1") CforecastId = int.Parse(cobconsumption.SelectedValue.ToString()); if (cobdemography.SelectedValue.ToString() != "-1") DforecastId = int.Parse(cobdemography.SelectedValue.ToString()); ReportParameter pSForecastId = new ReportParameter("SForecastId", SforecastId.ToString()); ReportParameter pCForecastId = new ReportParameter("CForecastId", CforecastId.ToString()); ReportParameter pDForecastId = new ReportParameter("MForecastId", DforecastId.ToString()); param.Add(pSForecastId); param.Add(pCForecastId); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "MForecastId"; rpMForecastId.Value = DforecastId; SqlParameter rpSForecastId = new SqlParameter(); rpSForecastId.ParameterName = "SForecastId"; rpSForecastId.Value = SforecastId; SqlParameter rpCForecastId = new SqlParameter(); rpCForecastId.ParameterName = "CForecastId"; rpCForecastId.Value = CforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); sqlParams.Add(rpSForecastId); sqlParams.Add(rpCForecastId); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spGetForecastComparision"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.forecastcomparision))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
public void LoadReport(int reportId) { if (reportId == 0)//supply Forecast Report { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyForecastDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 1)//supply procurement Forecast Report { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyprocurementDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyProcurement))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 2)//Patinet Distribution Forecast Report { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillPatinetDistributionDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.PatientNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 3)//Cd4 hivrapid Forecast Report { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillCD4HIVRapidDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.CD4TestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, _rDataSet2, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 4)//chemistry Other { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillchemistryOtherDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ChemistryNumberofTestForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 5)//hematology viral { FileInfo filinfo = null; List<ReportParameter> param = new List<ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillhematologyviralDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.HemaandViralTestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } }
private void FrmReportLoader_Load(object sender, EventArgs e) { if (_Report == OReports.ForecastResultSummary) { FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _parameters); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); } }
private void buttonLaunchReport_Click(object sender, EventArgs e) { try { if (comMethodologey.Text == MethodologyEnum.DEMOGRAPHIC.ToString()) { _mforecast = LqtUtil.GetComboBoxValue<MorbidityForecast>(cbomforecast); LoadReport(cboreport.SelectedIndex); } else { FileInfo filinfo = null; _finfo = LqtUtil.GetComboBoxValue<ForecastInfo>(comForecastinfo); List<ReportParameter> param = new List<ReportParameter>(); ReportParameter finfo = new ReportParameter("ForecastId", _finfo.Id.ToString()); param.Add(finfo); FillReportDataSet(); if (rdosite.Checked) filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ServiceQSummary))); else filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.FullQSummary))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); } } catch (Exception ex) { new FrmShowError(new ExceptionStatus() { message = "", ex = ex }).ShowDialog(); } }
private void btnviewreport_Click(object sender, EventArgs e) { if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString() || comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { ReportParameter finfoparam = new ReportParameter("forecastid",DforecastId.ToString()); param.Add(finfoparam); ReportParameter siteid = new ReportParameter("siteid", "0"); param.Add(siteid); ReportParameter catid = new ReportParameter("catid", "0"); param.Add(catid); ReportParameter protypeid = new ReportParameter("protypeid", "0"); param.Add(protypeid); if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString()) { ReportParameter testareaId = new ReportParameter("testareaId", "0"); param.Add(testareaId); } } else { ReportParameter pDForecastId = new ReportParameter("ForecastId", DforecastId.ToString()); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "ForecastId"; rpMForecastId.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); } DataSet _rDataSet = new DataSet(); if (comMethodologey.Text == MethodologyEnum.DEMOGRAPHIC.ToString()) { _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spMorbiditySupplyProcuremnetForecast"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.Dforcastcostsummary))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } else if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString() || comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { FrmReportViewer frm = new FrmReportViewer(); if (comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptConsumptionCostSummary))); frm = new FrmReportViewer(filinfo,FillFinfoReportDataSet(), FillDetailReportDataSet(), param); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptServiceCostSummary))); frm = new FrmReportViewer(filinfo, FillReportDataSet(), FillFinfoReportDataSet(), FillDetailReportDataSet(), FillServiceDetailReportDataSet(), param); } frm.ShowDialog(); } }
public void LoadReport(int reportId) { if (reportId == 0)//supply Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyForecastDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 1)//supply procurement Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyprocurementDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyProcurement))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 2)//Patinet Distribution Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillPatinetDistributionDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.PatientNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 3)//Cd4 hivrapid Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillCD4HIVRapidDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.CD4TestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, _rDataSet2, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 4)//chemistry Other { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillchemistryOtherDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ChemistryNumberofTestForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 5)//hematology viral { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillhematologyviralDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.HemaandViralTestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } }
private void btnviewreport_Click(object sender, EventArgs e) { try { if (_parentId == 3) { _mforecast = LqtUtil.GetComboBoxValue<MorbidityForecast>(cobforecast); LoadReport(_subreportId); } else { FileInfo filinfo = null; _finfo = LqtUtil.GetComboBoxValue<ForecastInfo>(cobforecast); List<ReportParameter> param = new List<ReportParameter>(); ReportParameter finfo = new ReportParameter("ForecastId", _finfo.Id.ToString()); param.Add(finfo); FillReportDataSet(); if (cobreporttype.SelectedIndex==0) filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ServiceQSummary))); else filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.FullQSummary))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; // Close(); frmRV.ShowDialog(); } } catch (Exception ex) { new FrmShowError(new ExceptionStatus() { message = "", ex = ex }).ShowDialog(); } }
private void btnviewreport_Click(object sender, EventArgs e) { int DforecastId = 0; if (cobdemography.SelectedValue.ToString() != "-1") DforecastId = int.Parse(cobdemography.SelectedValue.ToString()); ReportParameter pDForecastId = new ReportParameter("ForecastId", DforecastId.ToString()); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "ForecastId"; rpMForecastId.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spCD4TestNumberForecast"); SqlParameter rpMForecastId1 = new SqlParameter(); rpMForecastId1.ParameterName = "ForecastId"; rpMForecastId1.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId1); DataSet _rDataSet1 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spHIVRapidTestNumberForecast"); SqlParameter rpMForecastId2 = new SqlParameter(); rpMForecastId2.ParameterName = "ForecastId"; rpMForecastId2.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId2); DataSet _rDataSet2 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spChemandOtherNumberofTestforecast"); SqlParameter rpMForecastId3 = new SqlParameter(); rpMForecastId3.ParameterName = "ForecastId"; rpMForecastId3.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId3); DataSet _rDataSet3 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spHemaandViralNumberofTest"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.Forecastresulttestbyregion))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, _rDataSet1, _rDataSet2, _rDataSet3, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }