flyboy66102
MIS
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
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