C# 中 RDLC 报告的分页
我正在处理 RDLC 报告。我必须处理 65000 条记录,处理大约需要 5 到 6 分钟。之后我只需将此数据集分配给报告。在此期间用户只能等待。
是否有任何选项可以让我每页显示 10 条记录,当用户导航到下一页时,我处理接下来的 10 条记录并将它们显示在页面中。这样应用程序的响应速度会更快。
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. 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用异步编程或使用BackgroundWorker?它们将在执行阻塞过程(包括长时间运行的计算)时为您提供响应更快的 UI。
两者都有各自的优点和缺点。
使用 BeginInvoke 和 EndInvoke 模型和回调在 WPF 中使用异步编程非常困难(尽管在 C# 5/VB 11 异步编程的未来版本中进行了简化)。但是使用这个模型,您只需使用线程的上下文切换器。
使用BackgroundWorker,这意味着生成一个在后台运行的新线程。
有关使用事件编程模型在 .NET 中进行异步编程的更多信息:
http://msdn .microsoft.com/en-us/library/ms228969.aspx
这是BackgroundWorker的参考:
http://msdn.microsoft.com/en-us/library/system .componentmodel.backgroundworker.aspx
Have you tried using asynchronous programming or using BackgroundWorker? They will provide you more responsive UI while doing blocking process, including long running computations.
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). But using this model, you'll simply using context switcher of a thread.
Using BackgroundWorker, this means spawning a new thread running in background.
For more information about async programming in .NET using event programming model:
http://msdn.microsoft.com/en-us/library/ms228969.aspx
This is the reference of BackgroundWorker:
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx