Within a windows app, using C#, I have a reporting module that will be reliant upon classes to populate the reports. However there will be many reports and I do not want to have to code for each one.
The flow will be as such: Within the report editor, the report will be assigned a class (i.e. "Applications") as a string. When the user selected the report to run, the code will acquire the data from a SQL query. The code will take the data and find out which class to place the data into. Then the report will take the class and populate the report with the data from the class.
Here is my dilemna, how do I make the code dynamic so that the code will convert the assigned class into the proper Class Object?
Example in mind:
gVar = Report;
(gVar.ReportClass)oClass = new gVar.ReportClass;