|
-
Feb 2nd, 2009, 02:33 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Refresh problem with CRXI and VB6
I have several reports I'm calling from a VB6 app. The reports work fine but the data is often old requiring the user to refresh it before viewing. I've tried everything I can think of to force the report to refresh it's data on opening but nothing works .. instead I must wait for a second and hit the refresh button on the report. I've looked on the Net but no help is out there either. Surely there must be a way to do this with code or perhaps a setting on the report. Incidentally- I didn't save the data with the report.
TIA,
Ken
-
Feb 17th, 2009, 10:42 PM
#2
Thread Starter
Addicted Member
Re: Refresh problem with CRXI and VB6
I guess I'll post the answer to this problem here as nobody seems to have known how to do this. I was fiddling with anything I could think of to resolve this and came across the solution.
On the report form, the boilerplate code is given as :
Code:
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
I simply put Report.DiscardSavedData before the report source was declared. This apparently forces the report to refresh it's data which is what I wanted.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|