Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Packaging code as an object
Message
De
02/07/2000 03:14:30
 
 
À
01/07/2000 12:43:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00387366
Message ID:
00387512
Vues:
23
Steven:

I think you are being told to take your .prg file and start it with a DEFINE CLASS MyReport AS Custom etc., You may want to add an init method and perhaps slightly change the way the code in the prog runs as it may well be a little too procedural at the moment.

In this way, all of the existing procedure/functions in the prog file will become methods of the object MyReport. Then in Codemine, you can simply instantiate "MyReport" as a global service object. When you need the report to run, you would simply grab the "MyReport" global service object and fire the appropriate method to initiate the reporting processing ... MyReport.InitiatingAction() and so on.

I am not sure this is the best way to use a global service object but then that was not the question <s>.

HTH

>I was given the following recommendation when I asked about calling reports from a Codemine environment:
>
>For reports that can be run at any time, you should package the report code as an object, rather than just a set of procedures. THat way, you can create the reporter object as a GLobal Service Object, which will ensure that any report processing code will always run in the default data session. This will prevent conflcts with open cursors in any forms that are open when you run your reports. (If you just run a prg reporting function, it will run in the private data session of any open form, which can cause conflicts.)
>
>How do I 'package' the report code as an object. The report code is a .prg that calls 1 or more .scx's, .qpr's, and .frx's.
>
>Thanks
>Steve Baum
-=Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform