简体   繁体   中英

Using Report (Reporting Services) parameter values in ASP.NET page

I have a report (Reporting Services) integrated into an ASP.NET that shows dropdownlists to select report parameter values. The dropdownlists are populated using direct database selects, though I see the report RDL files do contain the paramter values and datasets as defined in the report designer.

Is it possible to obtain the report parameters "available values" in ASP.NET to populate the dropdownlists? This would avoid some code duplication.

Update

If the parameter doesn't use a query for available values, the following works:

foreach (ValidValue value in this.ReportViewerControl.ServerReport.GetParameters()["myParameter"].ValidValues) {
    this.DropDownListControl.Items.Add(new ListItem(value.Label, value.Value));
}

Still haven't found a way to access report datasets though...

我认为没有任何方法可以完成这项工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM