I want to generate a rdlc report by manually populating values to dataset because I send the date as an input to the query. I use the following code to do that
//my list get populated with the relevant records according to its date and I'm using the tableadapter of my dataset to do that
List<DailySalesEntity> list = DailySalesHandler.GetSalesByDate(dateTimePicker1.Value);
reportViewer1.LocalReport.DataSources.Clear();
Microsoft.Reporting.WinForms.ReportDataSource report = new Microsoft.Reporting.WinForms.ReportDataSource("DataSet_Dailysales", list);
reportViewer1.LocalReport.DataSources.Add(report);
reportViewer1.LocalReport.Refresh();
. I’m using a tablix to show my data using the dataset.I have set the correct report to the report viewer. I don’t get any exceptions. But the report keeps loading and does not show the report. What is it I’m doing wrong.
How can I populate the dataset by passing a parameter to the query, and use the resulting dataset in the report?