如何在 Reporting Services 中将参数传递给报表模型
我正在 RS 中开发报告,根据某些标准显示前 N 个客户。它还允许选择客户数量和时间段。
是否可以使用报表模型来做到这一点?看起来困难的是如何传递用户确定的参数。
我认为非常令人失望的另一件事是我无法使用 SQL 查询作为数据集查询,因为它使用奇怪且复杂的 XML。尽管报表模型项似乎将其字段映射到查询或表字段。
我正在考虑使用报告模型,因为我需要为或多或少不同的数据库模式提供统一的数据模型(相同的表和字段)。
如果有人能解释报告模型可以做什么和不能做什么,那就太好了。
I'm developing report in RS that show top N customers based on some criteria. It also allows to select number of customers and period of time.
Is it possible to do it by using report model? Thing that it seems to be difficult is how to pass parameters determined by user.
Another thing that in my oppinion is very disappointing is that i cannot use SQL query as dataset query, because it uses odd and elaborate XML. Although report model items seem to map its fields to query or table fields.
I m concerning using report models because i need to provide uniform data model (the same tables and fields) for more or less different database schemas.
It would be very nice if somebody would explain what can be done with report models and what can not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您正在寻找的是使用存储过程的结果作为报告的数据源。您需要在数据集级别定义参数以传递给 SP
Maybe what you're looking for is to use the result of a Stored Procedure as the data source for your report. You would need to define parameters at a Dataset level to pass to the SP
您可以通过查询设计器创建基于报表模型的参数化过滤器,方法是添加过滤器,将要过滤的字段拖到过滤器区域,然后右键单击它并选择“提示”。这将自动创建一个报告参数,然后您可以通过参数属性对话框进行编辑以设置数据类型、允许多个值等。
You can create report model based paramaterized filters through the query designer by adding a filter, drag the field you want to filter on into the filter area, then right click on it and select "Prompt". This will automatically create a report parameter which you can then edit via the parameter properties dialog to set the data type, allow multiple values, etc.