使用迭代参数的 SSRS 创建报告
我正在修改现有的报告,该报告设置为让您查看每个销售代表的统计信息。您可以通过更改报表视图中的参数销售代表
来完成此操作。
我需要修改报告,以便它可以为每个销售代表显示一个页面。然后,该数据将导出到 Excel,每个销售代表的统计数据将显示在单独的选项卡中。
我对此进行了研究,发现人们在谈论迭代报告,但我认为他们所指的并不是我所要求的:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/27ffabcc-6286-4fed-a8bf-0e5d78560be3
http://jameskovacs.com/2005/08/04/深入挖掘报告服务/
I am modifying an existing report which is setup to let you view statistics per sales rep. You do this by changing the parameter sales rep
in the report view.
I need to modify the report so that it can display a page for each sales rep. This will then be exported to Excel with each sales rep statistics being displayed in a separate tab.
I have researched this and found people talking about iterating over a report but I don't think that what they are referring too is what I am asking:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/27ffabcc-6286-4fed-a8bf-0e5d78560be3
http://jameskovacs.com/2005/08/04/digging-deep-into-reporting-services/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过多种方式完成此操作,因此这里有 1 个建议
You can accomplish this several ways, so here is 1 suggestion
我能想到的主要方法是将参数传递到存储过程中,并在其中使用逻辑将您想要的所有可能结果与用于对各部分进行分组的字段联合在一起。
例如,如果他们有“报告部分”的参数并选择了“1,2,3”,那么您可以将该参数传递给存储过程;它内部使用 SplitString 例程将逗号转换为表格式,然后构造另一个临时表来保存结果。所有内容都通过一个SectionNumber 字段(1、2、3 等)累积到那里,然后全部返回。您的小组在此基础上进行分组,并设置分页符,仅此而已。
The main way I can think of doing it is to pass the parameters into the stored procedure, and in there have logic to UNION together all the possible results you want with a field for grouping the sections.
For example if they had a parameter for "Report Sections" and had selected "1, 2, 3", then you pass the parameter to the stored procedure; inside it uses a SplitString routine to convert the commas into a table format, and then constructing another temp table to hold the results. Everything is accumulated into there with a SectionNumber field (1, 2, 3, etc), and then the whole lot gets returned. Your group groups on that, with page break set, and that's it.