Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sort data report
Message
From
27/05/2004 10:19:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/05/2004 01:55:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00907178
Message ID:
00907736
Views:
9
>hello,
>thank you for reply.
>
>i usedto run myreport via (vfp progarm) and via (myform).
>what you think,this is better.

That would depend on how you - and your users - want the design of your application, how you want your application to look.

You can put the code to prepare and run a report in a PRG, in a form, in a menu item, or in a class.

Some options are more flexible than others. For example, what happens if your user selects a menu item? (Any command, it doesn't matter which.) You can put all required code into the menu item.

But now suppose that you want the same code to be executed when the user does something else - for example, click on a button, in a toolbar. In this case, it is easier to have a procedure (function) in a PRG, and call this procedure it both from the menu, and the Button.Click() (in the Toolbar).

=======

Back to reports: In the system I created for Bata/Bolivia, most reports had an associated form. Sometimes, I used the same form for several related reports. In the form, the user could choose:

Destination (Preview / Print / Excel)

Page range

And quite often, several other options, relevant for the desired report. For example, options where the user can select a date range, or a specific client.

Then, the form has a button "OK", which will start the report. You can put the code to prepare the report (according to the selected options) and to print it in the Button.Click() event, or from a form method (which you call from the Click() event).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform