简体   繁体   English

在C#中的RDLC报告中分页

[英]Pagination in RDLC reports in c#

I am working in RDLC reports.I have to work on 65000 record and it takes about 5 to 6 minute in processing.After that I just assign this dataset to reports. 我正在处理RDLC报表。我必须处理65000条记录,处理大约需要5至6分钟。之后,我只是将此数据集分配给报表。 During this time user can do nothing but wait. 在这段时间内,用户只能等待。

Is there any option that I show the 10 records per page and when user navigate to next page I work on next 10 records and show them in page.So application will be more responsive. 是否有任何选项可以显示每页10条记录,当用户导航到下一页时,我将处理下10条记录并在页面中显示它们。因此应用程序将响应更快。

Have you tried using asynchronous programming or using BackgroundWorker? 您是否尝试过使用异步编程或使用BackgroundWorker? They will provide you more responsive UI while doing blocking process, including long running computations. 它们将在执行阻塞过程(包括长时间运行的计算)时为您提供响应更快的UI。

Both of them are having their own advantages and disadvantages. 他们两个都有自己的优点和缺点。

Using async programming in WPF is quite difficult using BeginInvoke and EndInvoke model and callback (although it's simplified in future release of C# 5/ VB 11 async programming). 在WPF中使用BeginInvoke和EndInvoke模型和回调进行异步编程非常困难(尽管在将来的C#5 / VB 11异步编程版本中已简化)。 But using this model, you'll simply using context switcher of a thread. 但是使用此模型,您将仅使用线程的上下文切换器。

Using BackgroundWorker, this means spawning a new thread running in background. 使用BackgroundWorker,这意味着产生一个在后台运行的新线程。

For more information about async programming in .NET using event programming model: 有关使用事件编程模型在.NET中进行异步编程的更多信息:

http://msdn.microsoft.com/en-us/library/ms228969.aspx http://msdn.microsoft.com/en-us/library/ms228969.aspx

This is the reference of BackgroundWorker: 这是BackgroundWorker的参考:

http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx http://msdn.microsoft.com/zh-CN/library/system.componentmodel.backgroundworker.aspx

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

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