>I have seen data environments (not to be confused with a DataEnvironment object) set up in VFP in many ways, and want some opinions on methods.
>
>When you have the DataEnvironment on the form set up and controlled properly, and then want to print a report on a subset of this data from a control on that form, I have seen:
>
>-SELECT statement in the object method, prior to REPORT statement that creates a new cursor for the report
>
>-DATAENVIRONMENT object in the report (private) that creates the proper cursor
>
>-SELECT statement in the INIT method of the report DATAENVIRONMENT
>
>I'm sure there are other permutations possible, but my question is this: I am assuming that I want the report to contain the environment information, so that the rules of encapsulation are enforced. However, when there is an intricate dataenvironment created in the form, it seems silly to recreate it in the report.
>
>Opinions, please?
Who me? (g)
We use SELECT in the INIT of the report. We find we have much better control that way.
HTH,
Tom