My Items table contains items with each item has a specific date. I want to generate a report that displays items between two different dates. For example, I'd put two timedatepicker controls so the user selects From: 24/9/2009 To: 19/3/2010 and then press a button to generate a report of items between these dates.
I'm using Report Viewer control btw not crystal report.
Edit:
Alright I figured it out using linq query and bind it to datasource like this:
var query = from c in MyDatabase01DataSet.Items
where c.ProductDate >= Convert.ToDateTime(x) && c.ProductDate <= Convert.ToDateTime(y)
select c;
ItemsBindingSource.DataSource = query.ToList();
reportViewer1.LocalReport.ReportEmbeddedResource = "[reportTest.Report3.rdlc";
reportViewer1.LocalReport.ReportPath = "Report3.rdlc";
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer1.RefreshReport();