您可以将报告参数从下拉列表级联到文本框吗?
我有一个 SQL Server 2005 Reporting Services 报告,其中包含三个参数,我想在它们之间实现某种依赖关系。
- 第一个参数是日期范围 这是一个包含各种内容的下拉菜单 约会前的天数 范围从现在开始。 它将有一个“自定义”值,用于标记何时应使用开始和结束日期时间参数。
- 第二个和第三个是 用户所在的日期时间参数 输入某种有效的日期时间 字符串表示或单击 日历框并选择这种方式,即“02/20/2009”
我遇到的问题是,我在依赖参数上偶然发现的所有材料都显示级联关系,其中存在一个基于确定下一个下拉列表的查询的下拉列表。
如何从使用查询的下拉列表级联到非查询的日期时间文本框?
I have a SQL Server 2005 Reporting Services report with three parameters I'd like to implement some kind of dependency relationship between.
- The first parameter is DateRange
which is a drop down with various
numbers of days back to make a date
range from the present day. It will have a "Custom" value which will be used to flag when the Start and End DateTime parameters should be used instead. - The second and third would be
datetime parameters where the user
enters some kind of valid DateTime
string representation or clicks the
Calendar box and selects that way, ie "02/20/2009"
The problem I have is that all the material I've stumbled across on dependent parameters shows cascading relationships where there is a drop down based on a query determining the next drop down.
How can you cascade from a dropdown, that uses a query, to a non-queried DateTime Textbox?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能不是您正在寻找的答案,但我通过将报表嵌入到网页中(使用 ReportViewer 控件)解决了这个(和其他)问题。 我使用 AJAX 在下拉菜单中级联值,这在 Reporting Services 中是极其困难的,然后将参数传递到代码隐藏中的报表。
我发现这要容易得多,因为我不受创建输入控件的方式的限制。 不过,YMMV。
This might not be the answer you are looking for, but I solved this (and other) problems by embedding the report into a web page (using the ReportViewer control). I use AJAX to cascade values across dropdowns in ways that would be exceedingly difficult in Reporting Services, and then pass the parameters to the reports in the codebehind.
I've found this to be much easier, as I'm not constrained with how I create my input controls. YMMV, though.
将默认值设置为表达式。 我相信,默认情况下,任何以等号开头的默认值都会强制报告将当前参数视为依赖于当前参数之上的所有参数。
Set the default value to an expression. I believe, be default any default values that start with an equals sign forces the report to treat current parameter as dependent on all parameters above the current parameter.