Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report does not Refresh.

Status
Not open for further replies.

sidanshu

Programmer
Aug 21, 2001
29
0
0
CA
HI Experts,
i am using a data report - which gets data from a temporary table that gets populated with required data through code.i have different criterias to run the report.Problem is whichever criteria i select first - report runs fine and then fo rthe second criteria- it does not refresh the data unless i exit the application and run again, though the table shows latest updated data.So i don't understand where is the problem,i am using "Datareport.Refresh" methos too, i even tried unloading and loading it again before refreshing.please help
 
I think I understand ur problem. But u didn't say which type of connection u r using. And if u can show me the procedure where u r executing ur report would be even better. I cannot tell u which is problem if I don't know what u r doing exactly....
 
hi fdalorzo,
thanks for the interest.well i am using the data environment/command object to populate the datareport- with backend as sqlserver.and i just have a main form with all my options (like-date range specs or report by a unit serial no. or just all records ) and when i say ok- that time i fetch the records from the DB- delete any previous records from the temporary table , insert the new ones and show the data report.as i said before temp table always contain the updated records.
If you need any other information please let me know.Thanks
 
Hi sidanshu!
i'm not sure if you have found a solution. But this is how i've done it in my program.

before the datareport1.show method

i give the datareport1.datasource = dataenvironment1

I've got the result. Hope it would solve the problem.

ARAVINDA SARMA M.
 
Thanks Arvind for the reply.
The way i solved the problem was to refresh the data environment everytime the report was opened ( instead of refreshing the report only) and that solved the purpose and i think by assigning again the dataenv to report would do the same.
So anyway thanks again.
Anshu
 
Hi Anshu,

I encounter the same problem. Can you tell me exactly how you can refresh the data environment?? I tried all kinds of way, but it doesn't work everytime. It work sometime and failed sometime. Please help

Ellen.
 
Well since I have found the solution, I would like to share it with other as I once have difficulties with refreshing data report too.

Example :

If DataEnvironment1.rsCust.state <> 0 Then
DataEnvironment1.rsCust.close
End If

rpt_Cust.refresh
rpt_Cust.show

--------------------------------------------
DataEnvironment : DataEnvironment1
DataMember : rsCust
DataReport : rpt_Cust
---------------------------------------------

Explaination :
Upon execution, the system will check whether the DataEnvironment1.rsCust.state (connection) is open or closed. If it is open, it will be closed.

Since it is closed, the command rpt_Cust.show statement will start connecting, query and then display the whole new report from the starting.

Hope it help those who need to know how to refresh the data report in VB 6.0.

Max - maxilesx@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top