Hi, I have a Data Environment (connection to sql server) and a Data Report in my project. I have this code to show the report:

VB Code:
  1. DataEnvironment1.Commands(1).CommandText = sQuery
  2. DataReport1.Show

It changes the query on the command object to the one I want at the time and shows the report.
The problem is that when i close the report and try to show it again it will give me the previous one and not the one specified with the data in sQuery variable. In other words it won't refresh. I believe the way I am handling the whole thing is not very standard...but I am not sure... can someone give me a clue?

Thanks