I've got a table (tblManagerReports) that will hold my report information. This table consists of 4 fields:
- ReportID - my Primary field
- ReportName - the name of the report which will be displayed
- SProc - the name of the stored procedure which needs to first run to calculate the data
- SQLView - the name of the view that will populate the final datagrid.
ReportID and ReportName are populating a dropdown list, and what I want to do is determine which report is selected, query tblManagerReports to grab the SProc and SQLView fields, and then execute the appropriate stored procedure and populate the datagrid with the view. I figured this is the best way to make this app scalable, as all future reports will just need to be added to the table.
I know a "good question" on SO includes code, but I don't even know where to begin with this. Can anyone help me out? I've tried to do some googling but can't seem to find any reference to having multiple columns available in a combo box (not displaying multiple columns, but pulling them in so information in them can easily be retrieved), which I thought at first could solve some of this problem.