swift
08-08-2000, 12:10 PM
I find that my datareports don't ever reflect changes I make to the database, unless I quit my program and re-run it. Is there a way to refresh the dataenvironment?
Steve
Steve
Dataenvironment refresh?swift 08-08-2000, 12:10 PM I find that my datareports don't ever reflect changes I make to the database, unless I quit my program and re-run it. Is there a way to refresh the dataenvironment? Steve karimahta 08-09-2000, 03:56 AM This is actually a known issue (except in Microsoft, I think) I have an article on it stashed aways somewhere and will post it when I find it. Alternatively, do a search on the past few months for "Data Report" or "Data Environment" with "Refresh" and look for my user name as I have posted this before. HTH swift 08-09-2000, 11:29 AM Just for the information of anyone else who has had this problem, I thought I'd tell you how I got around it. Simply put, before I call the datareport, I load the dataenvironment, and then unload it directly after. Load DataEnvironment1 DataReport1.Show Unload DataEnvironment1 It has worked for me... If anyone can think of other repercussions this method might have, please tell me. Steve karimahta 08-10-2000, 12:19 AM Excellent hack. Well done! I haven't heard of this solution before. Cheers DoubleDiamond 09-18-2002, 01:09 PM I was having problems with DataCombos emptying when I closed and reopened the Data Environment. NO LONGER THOUGH!! Awesome...a quick solution to a frustrating problem. THANKS! Tweeg 09-30-2002, 08:31 AM Hi guys, I still have the similar problem. My DataReport still shows the old data. Do u think that perhaps VB is taking a while to add in the data to my Access database? My report is used in a search area, where the user enters some search criteria and the results are displayed. Then it can be printed. Any assistance will be appreciated! Tweeg praveensg 09-30-2002, 09:27 AM if u are using ado to populate the report, then u might want to requery the recordset...and then display the report... Tweeg 10-01-2002, 01:58 AM Hi Thanks for the reply. I am using this code to populate the 3 tables on the database (Temp1, Temp2, Temp3): ----- Dim DB as Database Set DB = OpenDatabase("C:\LMM\LMM.MDB") DB.Execute ("Delete * from Temp1") DB.Execute ("Delete * from Temp2") DB.Execute ("Delete * from Temp3") DB.Execute("Insert into Temp1 Select......") DB.Execute("Insert into Temp2 Select......") DB.Execute("Insert into Temp3 Select......") ----- I won't go into detail with the code but I hope u get the gist. Now I have my DataEnvironment based on the 3 temp tables in the database and the DataReport is generated from there. A few q's arise: 1. How would I refresh this connection? 2. Is this a good way to do this? 3. I know I can use a DataControl but is it ok to have 3 datacontrols on the form - or how can I define a DataControl in code as a variable? Thanks in advance Tweeg Hasin 10-01-2002, 05:52 AM The solution is Easy. Suppose you command name under connectios is command1 The before showing the datrareport please use the following code On Error Resume Next dataenvironment1.rscommand1.requery datareport1.show This will solve all your problem. :) Tweeg 10-02-2002, 01:20 AM Thanks for the response Hasin praveensg 10-02-2002, 09:37 AM u got to requery any recordset (that populates the report) u have before showing... |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum