Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program that only prints a report
Message
De
22/03/2016 10:57:52
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01633497
Message ID:
01633501
Vues:
54
>Hi,
>
>I am creating a small project/program that will have only one purpose, to print a one-page report. As follows:
>1. The program will receive a parameter, order number.
>2. Based on the received order number, the program will connect to the SQL Server database, run SQL Select (get the record joined with a couple of other records)
>3. Print one-page report of this order.
>
>I am thinking of doing the entire code in the MAIN.PRG, where the parameter will be received. Another approach is to create a class instantiated in the MAIN.PRG and do the code in this class.
>
>My question is, are there any advantages of coding in the class vs. right in the MAIN.PRG?
>
>Note that once the program runs it should close immediately. So I won't even have READ EVENTS.
>
>TIA

I have used a similar type of program myself for years, but I run it as a service. The program checks for the existence of a file with a name like *.inv in a specific folder, where * is the invoice number in question. If the file is empty, the invoice is printed. If it contains a valid email address, a pdf is created and emailed. Once the job is done, the file is deleted, and the program waits for a new job.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform