Hi, I am a new member in this site. I am also just learning VB6. I made some progress in programming a report generator for my farm. However, after having designed a report using Data Report designer, I keep getting the same result or reports repeatedly although I have changed some parameters already. There's a need to click on the command button twice or reprocess the report twice just to get the desired data. Otherwise, old data on the reports remains which was actually the result of previous report processing. There seems to be a cache that keeps throwing the same data repeatedly although another recordsets of data have already been saved in the source table. I use Data Environment as data source for my report, Data Access Object for my forms and MS Access as database repository. Thanks.
Recommended Answers
Jump to PostHi,
Before showing the report just Refresh it..:
DataReport1.Refresh DataReport1.Show
Regards
Veena
Jump to PostHi,
u can try this :
dataenv.Command1.Open dataenv.Command1.Requery DataReport1.Refresh DataReport1.Show
Change the dataenv and command names..
Regards
Veena
Jump to PostHi,
Regards
Veena
Jump to PostI don't know if you found a solution but I fixed this by setting the Report Data Source to nothing and then assigning it again to the Data Environment like this:
Set DataReport1.DataSource = Nothing Set DataReport1.DataSource = DataEnvironment1
Do this before doing anything and that should …
Jump to PostMaybe somehow when you show the report, it's not updated yet, maybe it gets only updated after you click the ok(or whatever). If you send your code, someone might be able to catch your problem.
All 26 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.