Data Report Refresh (not refreshing) 
Author Message
 Data Report Refresh (not refreshing)

I have an application in VB6 that uses an Access 2000 database and generates
various reports using Data Report.  Everything works find except once I run
a report, if I then edit any of the data and re-run the report, the edits do
not appear.  If I exit the application and re-start it, the edits then
appear when I run the report.  In other words, it is as if the Data Report
binds to the data at the time it is first opened and it is never Refreshed
even though I call rptMyReport.Refresh before calling rptMyReport.Show.

The tables in the database are edited using ADO data controls while the
reports are linked to commands in a data environment.  Any suggestions would
be greatly appreciated.

---David
See http://www.*-*-*.com/



Sat, 23 Feb 2002 03:00:00 GMT  
 Data Report Refresh (not refreshing)

Quote:

> I have an application in VB6 that uses an Access 2000 database and generates
> various reports using Data Report.  Everything works find except once I run
> a report, if I then edit any of the data and re-run the report, the edits do
> not appear.  If I exit the application and re-start it, the edits then
> appear when I run the report.  In other words, it is as if the Data Report
> binds to the data at the time it is first opened and it is never Refreshed
> even though I call rptMyReport.Refresh before calling rptMyReport.Show.

> The tables in the database are edited using ADO data controls while the
> reports are linked to commands in a data environment.  Any suggestions would
> be greatly appreciated.

  Yeah, this is a feature of DataReports.  Seems like the recordset is
created when you first run the report...when you close the report, the
recordset stays open.  When you run the report again, the recordset
doesn't get refreshed, so you're still looking at the same old data.  Of
course, exiting the application and restarting will clear the recordset,
but that's not too elegant, eh?
  What worked for me was adding a line of code to the _Terminate event
of the DataReport to close the recordset of the Command on which the
report is based:

 DataEnvironment1.rsCommand3.Close

...but my app builds the SQL for the Command and re-Executes it every
time I run the report.  Hope the same idea works in your case.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"

"What's so funny 'bout peace, love & understanding?"
     - Nick Lowe



Sun, 24 Feb 2002 03:00:00 GMT  
 Data Report Refresh (not refreshing)
I regret to say that on the first attempt your suggestion did not work for
me, but I'll try a little more experimenting.  I'm sorely tempted to go back
to Crystal Reports.
---David
See http://www.StrategicThoughts.com
"Compare between shared ideals,
    choose between real alternatives."



Quote:

> > I have an application in VB6 that uses an Access 2000 database and
generates
> > various reports using Data Report.  Everything works find except once I
run
> > a report, if I then edit any of the data and re-run the report, the
edits do
> > not appear.  If I exit the application and re-start it, the edits then
> > appear when I run the report.  In other words, it is as if the Data
Report
> > binds to the data at the time it is first opened and it is never
Refreshed
> > even though I call rptMyReport.Refresh before calling rptMyReport.Show.

> > The tables in the database are edited using ADO data controls while the
> > reports are linked to commands in a data environment.  Any suggestions
would
> > be greatly appreciated.

>   Yeah, this is a feature of DataReports.  Seems like the recordset is
> created when you first run the report...when you close the report, the
> recordset stays open.  When you run the report again, the recordset
> doesn't get refreshed, so you're still looking at the same old data.  Of
> course, exiting the application and restarting will clear the recordset,
> but that's not too elegant, eh?
>   What worked for me was adding a line of code to the _Terminate event
> of the DataReport to close the recordset of the Command on which the
> report is based:

>  DataEnvironment1.rsCommand3.Close

> ...but my app builds the SQL for the Command and re-Executes it every
> time I run the report.  Hope the same idea works in your case.
> --
> Jim in Cleveland
> If you're writing to me, in my address
> change "REAL_Address.see.below" to "worldnet.att.net"

> "What's so funny 'bout peace, love & understanding?"
>      - Nick Lowe



Sun, 24 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Crystal Reports will not refresh data

2. VB4(16) Crystal Reports not auto refreshing data

3. Crystal report data not Refreshing

4. Crystal Reports 7 not refreshing data when printing and printing blank pages

5. Crystal Reports does not refresh after new data has been

6. Crystal Reports does not refresh after new data has been entered

7. data source in the report does not refresh

8. Report data not refreshing

9. Report Data Not Refreshing

10. Crystal Reports 6 not refreshing the data in VB6

11. Crystal Reports OCX - Does Not Refresh Report

12. Dynamic ADO Recordset Not Dynamic (Does Not Refresh Data)

 

 
Powered by phpBB® Forum Software