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

Report Refreshing in VB6 NOW refreshing

Status
Not open for further replies.
Nov 27, 2002
8
US
Programs: Crystal Reports 8.5, Visual Basic 6 sp5,
Other Info: Using OCX, Data Saved with Report set to Off,
Report Refresh button enabled.

Problem: Using the OCX a report would be generated correct the first time, rerun the same report and no data would be displayed. Using the Refresh Report Icon in the viewer would refresh the data after one or two clicks.

Solution: Not sure why this combination works, but it does.
CrystalReport1.RetrieveDataFiles
CrystalReport1.RetrieveSQLQuery
CrystalReport1.Action = 1
CrystalReport1.Reset

If the RetrieveDataFiles or the RetrieveSQLQuery are remarked out, the problem list above exists, if the code is run as shown above the report refreshes the data as it should.

I hope this helps someone as much as it did me. Oh, how I found this was I got to the point of just tying things and got lucky.

Flyboy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top