Click here to Skip to main content
11,705,763 members (40,742 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB VB.NET
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.
Posted 3-Sep-10 23:48pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
rashidfarooq at 5-Sep-10 11:15am
   
Thanks Brother. According to your suggestion, I did, and I got the fine result.
So, Thanks very much for solving my Problem.
Sandeep Mewara at 5-Sep-10 13:18pm
   
:)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Just do it..
CrystalReportViewer1.ReportSource = Nothing
CrystalReportViewer1.Refresh()
It will clear your crystal report viewer.
  Permalink  
Comments
Member 11804373 at 11-Aug-15 2:42am
   
Nothing=?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 213
1 Sergey Alexandrovich Kryukov 170
2 Inimicos 60
3 ProgramFOX 50
4 F-ES Sitecore 45
0 OriginalGriff 9,037
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100