> hi Expert
> how to use cursor at data environment , i mean when i select some data from any table like this
>
> select * from table1 where date = date() into cursor my_table
>
> now i want to use cursor my_table for view reports and print report also.
> please guide me.
> thanks
> best regards
When you can create the "Select .. Into Cursor ..." cursor, it would be available as an alias, named "my_table" in your case, in the current Data Session.
So that if you want to "Report Form ... [Preview]", you'd just need to make sure it's the currently selected alias, AKA "work area".
The Form.DataEnvironment of the currently active form (if any) would not care much about the new alias, the only relation among those two concepts would be that when the current Data Session is getting closed, for example by doing a "Thisform.Release()" while Thisform.DataSession=2, "private data session", all aliases would get closed too, no matter whether they belong to the Form.DataEnvironment or not.
If on the other hand your question rather is Can I use myCursor in the Report Designer's "Data Environment" window, then the answer would be No, instead you would set the report "fields" properties manually if the data source is a temporary cursor
hth
-Stefan