开发者

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

开发者 https://www.devze.com 2022-12-28 13:51 出处:网络
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

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 开发者_Python百科"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...


I think there is not any way for doing this work.

0

精彩评论

暂无评论...
验证码 换一张
取 消