-
I have an application that I am writing and it contains a data enviroment and a data report.
I have linked the data report to the data enviroment but the data that is reported is old data the data that was captured when I created the command in the Data Enviroment.
How do I refresh the data before I report using it?
Thanks
Simon
-
Data Report Master!
Hello, I am the Data Report Master! LOL
If you are really interested in doing this, I usually bypass the DE altogether! The Data Report does not need the Data Environment to run, but then you must understand SHAPE Recordsets!
Email me at [email protected]
-
say that I want to keep what I have got but just want to refresh the data source each time before I run the report?
-
Try this it seemed to work for me....
Code:
Load DataEnvironment1
With DataEnvironment1
If .rsCommand1_Grouping.State Then .rsCommand1_Grouping.Close
.Commands!Command1_Grouping.CommandText = SQL_Statement_Here
.Command1_Grouping
End With
DataReport1.Refresh
If DataReport1.Visible = False Then DataReport1.Show
Unload DataEnvironment1
The next time you reload the report it should show the updated info.