简体   繁体   English

如何使用SQL Reporting Services在存储过程中插入分页

[英]How to insert paging in stored procedure using SQL reporting services

I have a report query that has many records and is getting very slow because the report brings all the results and then do the paging in memory. 我有一个报表查询,该查询具有许多记录,并且由于查询带来了所有结果然后在内存中进行分页而变得非常缓慢。 It would be possible to perform paging dynamically? 可以动态执行分页吗? For him to bring only the first 'n' records and only after the user access the next page of the report he go to the bank and bring the next page. 对于他来说,只带前n个记录,只有在用户访问报表的下一页之后,他才去银行带下一页。

It's not possible with native SSRS paging. 本机SSRS分页是不可能的。 You could simulate it by using an action to call the same report with a set of paging parameters, but it'd be a lot of work to subvert the way SSRS usually works. 您可以通过使用操作来调用带有一组分页参数的同一报表来模拟它,但是要颠覆SSRS通常的工作方式,将需要进行大量工作。 And it wouldn't work with exporting/printing. 而且它不适用于导出/打印。 Printing/exporting the report would only get the initial page, not all pages. 打印/导出报告只会得到初始页面,而不是所有页面。

A better way might be to limit the amount of data that can be returned in a single report, by forcing a limited date-range or other logical restriction. 更好的方法可能是通过强制限制日期范围或其他逻辑限制来限制单个报告中可以返回的数据量。

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

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