|
-
Mar 23rd, 2002, 09:30 PM
#1
Thread Starter
Lively Member
Report Question
Hello,
I have a little problem with a report.
I use this code to call the report :
On Error GoTo damn
DataEnvironment2.Commands("calendar").CommandText = "select * from calendar where time=""" + Text1.Text + """ And Date=""" + Text2.Text + """"
DataReport1.Refresh
DataReport1.Show
Exit Sub
damn:
MsgBox "Error creating report."
this works fine. But the thing is, its like it caches the results. As when text1 and text2 change, and I recall the report, I get the same result!
at first I thought it was a problem with my SQL, so I created another button to acall the same report but with a different SQL line.
On Error GoTo damn
DataEnvironment2.Commands("calendar").CommandText = "select * from calendar where Date=""" + ListView1.ListItems(1).SubItems(1) + """ order by time"
DataReport1.Refresh
DataReport1.Show
Exit Sub
damn:
MsgBox "Error creating report."
anyway, this works just fine also. But then when I try to call the the report with the other code, I get the results for this one.
If that makes sense. Essentially, I am changing the SQL statement every time I call the report, but it seems to be "caching" the report and showing me a previously called one instead of the one I just called.
Does that make sense?
Does anyone know a cure?
Thanks alot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|