Skip to Content
Oct 04, 2012 at 07:08 PM

crystalReportViewer change dates


I'm using a crystalReportViewer where I allow a user to change the dates of the data of the report. I use the following code,

DataM.membersDataTable members = mta.GetDataByDateRange(dtStart.Value, dtEnd.Value); EmployeeActivity1.SetDataSource((DataTable)members);


Where dtStart and dtEnd are from a DateTimePicker. GetDataByDateRange is a call to a sql database that returns data for a given date range. crystalReportViewer1's ReportSource is set to EmployeeActivity1.

The problem is the data dosen't change when the user clicks the button that runs the code above. It keeps the data from the initial report and dates before the dates are changed. More confusing is this works in my office, but not when I deploy on the server. Does anyone see what's wrong or know how I can debug this?

Thanks in advance.