简体   繁体   English

创建/编辑订阅时禁用 SSRS 报告参数选择列表

[英]SSRS Report Parameter Pick Lists Are Disabled When Creating/Editing Subscriptions

I see a lot of similar questions posted, but none quite exactly like what I am experiencing.我看到发布了很多类似的问题,但没有一个与我正在经历的完全一样。

The parameter pick lists for the SSRS report work properly when running the report as you normally would, but certain ones do not work when trying to create or edit a subscription. SSRS 报告的参数选择列表在正常运行报告时正常工作,但在尝试创建或编辑订阅时某些选项列表不起作用。

I am unable to post the specific example, but will describe in detail.我无法发布具体示例,但会详细描述。

  • There are 6 parameters that may be used in the report.报告中可以使用 6 个参数。
  • All 6 are a single selection pick list.所有 6 个都是一个单一的选择列表。
  • The list includes the value NULL, which represents "All" to the underlying SQL query if selected.该列表包括值 NULL,如果选中,则表示基础 SQL 查询的“全部”。
  • Three of the pick lists populate perfectly fine on the report and on the subscription page:其中三个选择列表在报告和订阅页面上填充得非常好:
    • "Product Number" has available choices based on an underlying SQL query “产品编号”具有基于基础 SQL 查询的可用选择
    • "Type" has available choices hard coded “类型”具有硬编码的可用选项
    • "Type of Location" has available choices hard coded “位置类型”具有硬编码的可用选项
  • Three of the parameter pick lists do not populate properly on the subscription set up page, but do populate properly running the report manually.订阅设置页面上的三个参数选择列表正确填充,但手动运行报告时会正确填充。 I have included the screenshot below.我已经包含了下面的屏幕截图。
    • Country is populated by an SQL query国家由 SQL 查询填充
    • Region is populated by an SQL query that relies on Country (but accepts a NULL country value to just get all)区域由依赖于国家/地区的 SQL 查询填充(但接受 NULL 国家/地区值以获取全部)
    • Location is populated by an SQL query that relies on Regiona and Country (but accepts a NULL country and/or NULL region to just get all)位置由依赖于 Regiona 和 Country 的 SQL 查询填充(但接受 NULL 国家和/或 NULL 区域以获取所有信息)

So the report is strange because it works fine in SSRS Report Builder, works fine running manually from SSRS website, but the subscriptions page disables the drop down and does not allow me to select the value when the "Source of value" is set to "Enter value".所以报告很奇怪,因为它在 SSRS Report Builder 中运行良好,从 SSRS 网站手动运行运行良好,但订阅页面禁用下拉菜单,并且不允许我在“价值来源”设置为“输入值”。 The affected pick lists are technically the two cascading pick lists and the top level one they utilize (which does not rely on any parameters).受影响的选择列表在技术上是两个级联选择列表和它们使用的顶级选择列表(不依赖任何参数)。

Additional Details额外细节

  • There is an existing subscription that does have the country pick list set (must have worked at some point) and I can change it to another country still, but if I change it back to All at any point, the list now becomes disabled and I can't get it back.有一个现有的订阅确实设置了国家/地区选择列表(一定在某个时候有效),我仍然可以将其更改为另一个国家/地区,但如果我在任何时候将其更改回全部,该列表现在将被禁用并且我拿不回来了。
  • I have tried in Firefox/Edge/Chrome.我在 Firefox/Edge/Chrome 中尝试过。 Behaviour is the same in all three.三者的行为相同。
  • In Chrome, I entered developer mode and inspected the elements.在 Chrome 中,我进入了开发者模式并检查了元素。 When I examine the pick lists, all the values are present for the pick lists and they even update when I change the selection (from the existing subscription where country was selected I could witness this).当我检查选择列表时,选择列表的所有值都存在,当我更改选择时它们甚至会更新(从选择国家的现有订阅中我可以看到这一点)。
  • The behaviour is seen in multiple environments as well (developer servers, qa, and production).这种行为也出现在多种环境中(开发人员服务器、质量保证和生产环境)。

So basically I know the queries are returning the choices, the pick lists are updated if I change them, but the pick list in the UI is just disabled from selecting anything.所以基本上我知道查询正在返回选择,如果我更改它们,选择列表会更新,但是 UI 中的选择列表只是无法选择任何内容。

在此处输入图像描述

This isn't a complete answer, but the issue was definitely related to the cascading parameters.这不是一个完整的答案,但问题肯定与级联参数有关。 I removed the dependency inside Region and Location that used preceding parameters and now all the pick lists works again (even Country which was depended on, but did not have any dependencies itself).我删除了 Region 和 Location 中使用前面参数的依赖项,现在所有选择列表都可以再次工作(即使是 Country 依赖,但本身没有任何依赖项)。

Seems like a bug, but not sure.似乎是一个错误,但不确定。

So my report works fine, but you can technically enter parameters that are mutually exclusive and will return no results.所以我的报告工作正常,但从技术上讲,您可以输入互斥的参数并且不会返回任何结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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