如何使用 excel 分页符(不是单独的工作表)将 SSRS 报告导出到 excel?
How can I export an SSRS report to excel with excel page breaks (not separate worksheets)?
我正在寻找一种在导出的 SSRS 报告中设置 Excel 分页符的方法。我可以在整个网络上找到有关使用 SSRS 分页符来控制单独工作表上显示的内容的信息,但这不是我要找的。我希望我的报告呈现在 一个工作表 上,但在分页预览中查看导出的工作表时控制 Excel 的分页符出现的位置。
我只发现了另外两个问题 (here and here) 涵盖了我要问的问题,但这些话题中的 none 答案回答了我的问题。
这是一张图片,用于阐明我要控制的内容:
是否可以控制这些分页符,还是像Jeroen建议的那样仍然不可能?
我正在使用 BIDS 开发报告,我们的 SSRS 服务器是 2008R2。
即使在 SQL (SSRS) 2016 中,这也是不可能的:
来自 https://msdn.microsoft.com/en-us/library/dd255234.aspx?f=255&MSPPError=-2147217396
Page Sizing
The Excel rendering extension uses the page height and
width settings to determine what paper setting to define in the Excel
worksheet. Excel tries to match the PageHeight and PageWidth property
settings to one of the most common paper sizes. If no matches are
found, Excel uses the default page size for the printer. Orientation
is set to Portrait if the page width is less than the page height;
otherwise, orientation is set to Landscape.
SSRS 2008R2肯定还是做不到,老版本也不太可能加入。我可以看到它被添加到一个新版本中,但即使在那里,该产品也专注于向多个设备呈现更好的 HTML 输出。通过编写代码,理论上您可以创建自己的导出代码以导出到 Excel,但这将是一项艰巨的任务,至少需要数百甚至数千小时。
我正在寻找一种在导出的 SSRS 报告中设置 Excel 分页符的方法。我可以在整个网络上找到有关使用 SSRS 分页符来控制单独工作表上显示的内容的信息,但这不是我要找的。我希望我的报告呈现在 一个工作表 上,但在分页预览中查看导出的工作表时控制 Excel 的分页符出现的位置。
我只发现了另外两个问题 (here and here) 涵盖了我要问的问题,但这些话题中的 none 答案回答了我的问题。
这是一张图片,用于阐明我要控制的内容:
是否可以控制这些分页符,还是像Jeroen建议的那样仍然不可能?
我正在使用 BIDS 开发报告,我们的 SSRS 服务器是 2008R2。
即使在 SQL (SSRS) 2016 中,这也是不可能的: 来自 https://msdn.microsoft.com/en-us/library/dd255234.aspx?f=255&MSPPError=-2147217396
Page Sizing
The Excel rendering extension uses the page height and width settings to determine what paper setting to define in the Excel worksheet. Excel tries to match the PageHeight and PageWidth property settings to one of the most common paper sizes. If no matches are found, Excel uses the default page size for the printer. Orientation is set to Portrait if the page width is less than the page height; otherwise, orientation is set to Landscape.
SSRS 2008R2肯定还是做不到,老版本也不太可能加入。我可以看到它被添加到一个新版本中,但即使在那里,该产品也专注于向多个设备呈现更好的 HTML 输出。通过编写代码,理论上您可以创建自己的导出代码以导出到 Excel,但这将是一项艰巨的任务,至少需要数百甚至数千小时。