none
Asp.Net report with return parameters RRS feed

  • Question

  • I have a report that displays data based on date range: start date, and end date. These are the parameters fed to the dataset. Is there a way to intercept these parameters and feed them to the report?

    Here is my code:

    reportViewer1.LocalReport.DataSources.Clear();
                    ReportDataSource rds2 = new ReportDataSource("DataSet1", ods);
                    reportViewer1.LocalReport.DataSources.Add(rds2);
                    ods.SelectMethod = "GetTransactionByDateRange";
                    ods.TypeName = "ConsumablesTransactionLogBLL";
                    ods.SelectParameters.Add("sd", System.TypeCode.String, dateRange[0]);
                    ods.SelectParameters.Add("ed", System.TypeCode.String, dateRange[1]);
                    reportViewer1.LocalReport.ReportPath = Server.MapPath("~/Reports/Consumables_By_Range.rdlc");

    Thanks,

    Eric


    EJM

    Tuesday, April 3, 2012 5:19 PM