How can I assign sheet names when exporting an SSRS report to Excel?

↘锁芯ラ 提交于 2019-12-08 10:13:28

问题


I am able to have a report with multiple subreports export to Excel with each subreport on a separate tab/sheet using the info here (placing each subreport within a Rectangle control and setting its PageBreak property to "Start").

I hoped that setting the Rectangles' PageName property would set the sheet names to what I assign there, but no - they are simply "Sheet 2", "Sheet 3", etc.

So how can I assign a specific value to the sheet names so that those values are used when the SSRS report with its subreports is exported to Excel?

UPDATE

Trying Hannover Fist's suggestion, I set the Rectangles' PageName property:

...but the file is still created with generic sheet names:


回答1:


On My report, I selected the tablix group on Row Groups window, and I set the Group > PageName property of the group (I could even use a dataset field to name it). I succeeded on that.

In your case, is it possible to create a tablix and do the same, inserting the subreport into this main tablix? It might work.




回答2:


I think if you set the "PageName" in the tablix in the sub-reports it should show correctly.




回答3:


I usually put the subreport in a Rectangle and then give the Rectangle a Page Name.



来源:https://stackoverflow.com/questions/37928314/how-can-i-assign-sheet-names-when-exporting-an-ssrs-report-to-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!