views:

43

answers:

0

Existing application: Net application, crystal reports, datasets, setdatasource

Need to modify existing to use custom objects with no change to existing report templates.

Need to set different data tables of template with different collection objects like Employee to List collection, Contacts to List collection, etc

Now I need to know whether I can have a collection of different List objects so that I can bind them to report.Database.Tables[counter].SetDataSource in a loop (generic way) will reflection help if I just declare a type and have different List as members. performance is important.

Here is what we do right now: ReportDocument r = new ReportDocument(); r.Load(path); r.SetDataSource(dataset);

Now here is what I intend to do: Replace dataset with List collection Cannot change the report template though and it is been set to dataset schema Now lets say the template is set to 2 tables and I want to populate these tables using r.Databse.Tables["TableName"].SetDataSource(List);

My problem is I have different List to set for each table and that I want to do this in a generic way... like in a for loop

May be using collection of List then setting it one by one by comparing the table names with the T names..

Need to know the best approach..

Thanks!!