I have a date field and a button in my page.After selecting the date and when I click on the submit button I want to show the report.
I want that selected date on my report,like below
StartDate:"selected value on datepicker".
I added a parameter in rdlc and set its expression as
"=Parameters!fromDate.Value"
and in controller I wrote the code given below,
ReportParameterCollection reportParameters = new ReportParameterCollection();
reportParameters.Add(new ReportParameter("fromDate", dtStart));
reportViewer.LocalReport.SetParameters(reportParameters);
When I run I got an error like "object reference not set to an instance of an object in rdlc report"
Can anyone help me please