简体   繁体   English

SSRS导出到Excel筛选器到许多选项卡

[英]SSRS Export to Excel Filter To Many Tabs

I am currently using MS Visual Studio 2012 and SQL Server 2012. 我目前正在使用MS Visual Studio 2012和SQL Server 2012。

In my SSRS report, I currently have a table with 4 columns in it with 7 records like so: 在我的SSRS报告中,我目前有一个包含4列的表格,其中包含7条记录,如下所示:

 ID FirstName LastNameInitial Department
 1  Joe        S              Management
 2  Sally      T              Management
 3  Kyle       V              Employee
 4  Sandra     B              Employee
 5  Nick       N              Management
 6  Jess       A              Management
 7  Priya      S              Employee

I want to make it so that when a user exports from SSRS to Excel, that I can have 2 separate tabs (Management, Employee) that the records will filter to. 我要这样做,以便当用户从SSRS导出到Excel时,我可以有2个单独的选项卡(管理,员工),记录将被过滤到这些选项卡。

For example, ID's #1,2,5,6 would go underneath Management Tab. 例如,ID的#1,2,5,6将位于“管理”选项卡下面。 And the others would go underneath Employee Tab. 其他的将位于“员工”选项卡下。

Can someone help me with how to do this? 有人可以帮助我吗? Or maybe suggest an easier way to go about this? 还是建议一种更简单的方法来解决此问题?

The best I can offer is to: 我能提供的最好的是:
Add a parent group, and group by Department. 添加一个父组,然后按部门分组。
Right click on the new group and add a page break between each instance of a group. 右键单击新组,然后在组的每个实例之间添加一个分页符。 (This will now mean that Management and Employee will be shown on separate pages). (这将意味着“管理层”和“员工”将显示在不同的页面上)。
Delete the new parent column, making sure to choose delete columns only. 删除新的父列,确保选择仅删除列。
When you export you will now have multiple tabs. 导出时,现在将具有多个选项卡。
Use the demo provided in the comment above to set the tab names automatically http://www.bidn.com/blogs/PatrickLeBlanc/ssis/762/ssrs-r2-naming-excel-worksheet-tabs 使用上面的注释中提供的演示自动设置选项卡名称http://www.bidn.com/blogs/PatrickLeBlanc/ssis/762/ssrs-r2-naming-excel-worksheet-tabs

使用一个列表,将我的表放在其中,然后在需要分组的特定列上分组。

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

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