Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 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();
     }
 }
Exemplo n.º 5
0
        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();
            }
        }
Exemplo n.º 6
0
        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();
        }
Exemplo n.º 7
0
        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();
        }
Exemplo n.º 8
0
        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();
        }
Exemplo n.º 9
0
        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();
            }
        }
Exemplo n.º 10
0
 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();
     }
 }
Exemplo n.º 11
0
        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();
            }
        }
Exemplo n.º 12
0
        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();
            }
        }
Exemplo n.º 13
0
        private void butSummary_Click(object sender, EventArgs e)
        {
            FileInfo filinfo;

            List<ReportParameter> param = new List<ReportParameter>();
            ReportParameter finfoparam = new ReportParameter("forecastid", _forecastInfo.Id.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 (_forecastInfo.FMethodologeyEnum == MethodologyEnum.SERVICE_STATISTIC)
            {
                ReportParameter testareaId = new ReportParameter("testareaId", "0");
                param.Add(testareaId);
            }

            FrmReportViewer frm = new FrmReportViewer();
            if (_forecastInfo.FMethodologeyEnum == MethodologyEnum.CONSUMPTION)
            {
                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();
        }
Exemplo n.º 14
0
        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();
            }
        }
Exemplo n.º 15
0
        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();
        }