cancel
Showing results for 
Search instead for 
Did you mean: 

crystalReportViewer change dates

0 Kudos
59

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);

crystalReportViewer1.RefreshReport();

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

If the code works on one computer and not another, it more than likely is not the code. Use the Modules utility and compare the runtime for the app - both CR runtime and db client runtime.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Answers (0)