I've written a C# application that basically is used to run and display a Crystal Report. I used VS 2010 to create the application along with SAP Crystal Reports for VS 2010. I've got code in my application that looks at the parameters in the crystal report. If the parameter name matches a name in a i have in a subroutine, I will pull a sql query out of a database and load up a Datatable. I then loop through the datatable and load the DefaultValues field of the current parameter i am on. The purpose is to give the user a dynamic (up to date) list of say a personnel table. This works but it is extremely slow. To load about 500 names in the defaultvalues list it takes about 5 minutes. Does anyone have a solution for this. Is there a way to load the entire datatable at one time instead of walking the table. Any help would be appreciated.
Attached is the code.