Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Refresh

Status
Not open for further replies.

zzAdm

Technical User
Dec 31, 2001
13
0
0
GB
Hye,
Can anyone tell me / show me how to refresh a crystal report via vb code?
Thanks,
Adam.

Im using VB6.0 and Crystal 8.5
 
I think the answer is to use the report object with DiscardSavedData method. Right before you call your report (lets say you named it crMyReport), you call discardsaveddata. It would look like this:

crMyReport.DiscardSavedData

Then you go on to call the reports like you normally would. This way, all data on the report is cleared and discarded before the next set of data is viewed. This way, you dont have to manually refresh your CRViewer everytime. Hope this helps.
-

WebFusion Design
Looking Toward The Future
 
Hello
If I understand correctly your answer, I would place the Report.DiscardSavedData right before CRViewer.Refresh ?
Because it doesn't seem to work as it should...
 
as long as you're not saving the data with the report it should refresh itself everytime you open it or call to it. ----------------
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top