如何清除Crystal Report Viewer中的数据 [英] How to clear the data in a Crystal Report Viewer

查看:93
本文介绍了如何清除Crystal Report Viewer中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友



我正在使用VB.Net中的Windows应用程序。我已经制作了一个搜索表单。在这种形式中,我有一个Crystal Report Viewer(CRVSearch)。我已将此CRVSearch的报告源设置为rptDailyExpenses。

它工作正常。

但问题是我想在那个表单上放一个按钮来清除Crystal Report Viewer的数据,当我按下它时。

那么,清除CRVSearch数据的代码是什么。



Plz帮助我。等待答案。

Dear Friends

I am working on a windows application in VB.Net. I have made a Search form. In this form I have a Crystal Report Viewer(CRVSearch). I have set the report source of this CRVSearch to rptDailyExpenses.
It works fine.
But the Problem is that I want to put a button on that form that Clears the data of Crystal Report Viewer, When I pressed it.
So, Which will be the code that clears the data of the CRVSearch.

Plz Help me. Waiting for Answer.

推荐答案

为什么不用清除按钮,在触发器上用空数据集重新绑定水晶报告。这样就可以清除数据了。
Why don''t you put clear button, on trigger of which you re-bind the crystal report with an empty dataset. This would give effect of clearing data.


就这么做..

CrystalReportViewer1.ReportSource = Nothing

CrystalReportViewer1.Refresh()

它将清除你的水晶报告查看器。
Just do it..
CrystalReportViewer1.ReportSource = Nothing
CrystalReportViewer1.Refresh()
It will clear your crystal report viewer.


这篇关于如何清除Crystal Report Viewer中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆