Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data environment for report - opinions, please
Message
 
To
25/02/1997 11:21:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00021948
Message ID:
00021977
Views:
30
>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?


Here are Cent 5 and Cent 6

Usually I use the SELECT in the INIT method, and have a variable which is used to set parameters as necessary.

While writing the report, I use an ad hoc view in the dataenvironment which has the correct fields and a standard alias of 'ReportVu'. This way I can drag/drop fields easily and the properties are correct. The view is always marked AutoLoad = .f., and is erased after the report is written so it doesn't conflict with the INIT code.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform