I've managed to get this far, and could just use a nudge in the right direction if possible:
I wanted to select values from my database, have my business object return them in a collection (generic) and then create parameters in a dropdownlist at the top of the report, so a user can select an item at the top. Subsequently, this item would go out to a stored procedure, that would get different results on the page (i'm actually using a graph on the chart/report)
List
<string> campaignTypes = ReportGenerator.GetCampaignTypes(parameters/metadata goes here..);
int i = 0;
foreach (string campaignType in campaignTypes)
{
ReportParameter rp = new ReportParameter(campaignType, ReportParameterType.String, campaignType);
this.ReportParameters.Add(rp);
this.Report.ReportParameters[i].UI.Text = campaignType;
this.Report.ReportParameters[i].UI.Visible = true;
i = i + 1;
}
So the area in green..this goes ahead and adds 3 parameters (i had 3 items in the list), but the problem is they are all new parameters in textboxes! I wanted to have 3 in one report parameter collection, as a dropdownlist.
I understand there is a reportparametercollection, but I did not see a way to add it to the report. Only to create it and add report items to it. This code is in the constructor of my report, by the way. Any suggestions on how to get the dropdownlist to appear, and have it's datasource as the generic?
Thanks so much!