1
Answer

RDLC Drill Down

pradeep kumar

pradeep kumar

7y
3.3k
1

I am Using a RDLC pie chart with two Slices...., On click of chart i want to show the another report and this clicked value as one of the parameter....,

I am using Drill through Method for this approach and i have given go to report-->name.rdlc

and in report viewer Ondrillthrough="method"

i have used the below code...,

 string Status = string.Empty;
                const string rut = @"rptEpaymentStatus.rdlc";
            //ReportParameterInfoCollection parentparameters = e.Report.GetParameters();

            //foreach (ReportParameterInfo pp in parentparameters)
            //{

            //     Status = Convert.ToString(pp.Values[0]);
            //    //string Status1 = Convert.ToString(pp.Values[1]);
            
            //}

            LocalReport report = (LocalReport)e.Report;
            string ststus = string.Empty;
            IList<ReportParameter> list = report.OriginalParametersToDrillthrough;
            foreach (ReportParameter param in list)
            {
                //Since i know the parameter is only one and its not a multivalue
                //I can directly fetch the first value from the Values array.
                ststus = Convert.ToString(param.Values[0]);
            }
           
                DataTable OutPutData = new DataTable();
                OutPutData = ObjClsDashboard.GetEpayrpt(dtFromdate.SelectedDate, dttoDate.SelectedDate, Status);
               



                rptepaymentstatus.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
                
                //rptepaymentstatus.LocalReport.ReportPath = rut;
                rptepaymentstatus.LocalReport.DataSources.Clear();
                rptepaymentstatus.Reset();
                rptepaymentstatus.LocalReport.ReportEmbeddedResource = rut;
                rptepaymentstatus.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DSEpaymentstatusChart", OutPutData));
                rptepaymentstatus.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DSEpayStatus", OutPutData));
                //rptepaymentstatus.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DS2", OutputData1));
                rptepaymentstatus.DocumentMapCollapsed = true;
                rptepaymentstatus.LocalReport.Refresh();
                rptepaymentstatus.ShowParameterPrompts = false;
                rptepaymentstatus.Visible = true;


Answers (1)