确定是否水晶报表已经显示出之前没有数据报表、水晶、数据

由网友(醉里挑灯看剑)分享简介:我有一个WinForms应用程序,当用户运行一个报告可能没有数据显示。I have a winforms application, when a user runs a report there may be no data to display.我想拦截的事实,没有数据的,而不是显示空白报表,使用.NET显示错误...

我有一个WinForms应用程序,当用户运行一个报告可能没有数据显示。

I have a winforms application, when a user runs a report there may be no data to display.

我想拦截的事实,没有数据的,而不是显示空白报表,使用.NET显示错误消息。

I'd like to intercept the fact that there is no data an instead of showing the blank report, display an error message using .NET.

有一个属性,我可以在报表显示前检查?

Is there a property I can check before the report displays?

推荐答案

如果你想赶上它在你的表单,你需要有一些code的形式执行相同的查询,该报告将执行和看看是否有装载报告之前返回的任何记录。然后你就可以显示你的消息框,并加载报告前取消。

If you want to catch it in your form, you would need to have some code in the form perform the same query that the report will perform and see if there are any records returned before loading the report. Then you can show your message box and cancel before the report is loaded.

阅读全文

相关推荐

最新文章