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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requerying Report Programmatically in VB

Status
Not open for further replies.

rickj65

Programmer
Jun 5, 2002
79
US
I'm using the Crystal ActiveX Report Viewer in VB. When I run a report with 2 parameters (passed through VB code), the report displays data from the last time I ran the report. After I click on the Refresh button, the updated records appear.

What is the command for refreshing the data automatically in code? I'm still trying to figure this one out.

TIA,
Rick
 
One of the easiest approaches is to ensure that you save your report(s) without saved data.

Check File >> Save Report With Data and make sure there is no check mark.

With this off, each time you request the report it will require data.

There is also a DiscardSavedData method you could call to dump the report data.

Seems a bit odd that when you pass in the param info you get the old data. Unless of course the params are the same as the old data. The report without data will let you know if the params are being passed in properly.


Cheers,

SurfingGecko
Home of Crystal Ease
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top