SQL Server Reporting Services (SSRS): Reporting Services in SQL Server 2012 (codename "Denali") will support XLSX, DOCX formats. Bye bye 65536 rows limit in XLS files ;)
当SSRS报表的时候,若相应EXCEL是2003以下,在行数超过65536的时候报表会报错
“Microsoft.ReportingServices.ReportProcessing.HandledReportRenderingException: Excel Rendering Extension: Number of rows exceeds the maximum possible rows per sheet in this format; Rows Requested: NNNNNN, Max Rows: 65536“
在不升级EXCEL版本的前提下,如果解决此问题。
我们可以在报表Tabtrix加多一个分组。利用分组的属性“Page Breaks”属性,勾选“Page break option”->"Between each instance of a group". 而分组字段的值利用ROWNUMBER函数。
例如=Int((RowNumber(Nothing)-1)/65000);意为每个Sheet65000行数据,超过自动拆分到其他Sheet.
属性设置如图示。