Click to See Complete Forum and Search --> : Updating generated reports
Spooked
Jun 22nd, 2000, 03:32 PM
How do I go about updating a report? The problem is if I add data to my database, the updated records or new records do not appear on the report until I completely exit the program and restart it.. Very irritating and not very practical as you might imagine. What do I need to do to update the report?
Altecjjf
Jun 22nd, 2000, 07:16 PM
hey spooked
Where are you doing this in Access97, VB6, or crystal reports???
Spooked
Jun 22nd, 2000, 08:12 PM
I'm using Visual Basic 6 with Access '97 and I think its Crystal reports :)
The reports are under designers in the project explorer window and I'm using a connection under designers to create the reports. I think I need to be able to update the connection before the reports will update because by the looks of it the connection under designers is only refreshed or updated when the application is restarted.
Altecjjf
Jun 22nd, 2000, 09:49 PM
Well i have come to find out that is a pain sometimes. What you could try to do is before you run the report from VB6. try a REFRESH before the report is ran. It may save the data to the database and then the report may work. I have notices that sometimes the data is not written to the database until the program is exited. So you have to force the data to the databse. Like i said try REFRESH or REQUERY.
Let me know what happens
Altecjjf
Spooked
Jun 22nd, 2000, 11:33 PM
I cannot see a refresh or requery method available for the connection or its commands. There is open and close but that seems like a very roundabout way to do it. Any other suggestions?
Altecjjf
Jun 22nd, 2000, 11:53 PM
Yeah try doing the REFRESH before you open the report. If i think i know what you are doing you have command button that open up the report. I believe that Crystal reports has an active control from VB6. If i am wrong let me know. That how i do it. If that didn't help i am sorry. I built a program that would ask the user to run data between two dates. The query would run and the dates would be on the crystal report. I built the report but then never touched it again, all of it's changes were done through the program while it was running. It's been awhile but i think i remember. Let me know!!
Altecjjf
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.