Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program that only prints a report
Message
 
 
À
22/03/2016 10:57:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01633497
Message ID:
01633504
Vues:
42
>>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.

I have considered running this program as a service but I don't have an expertise not the confidence that I can create a service.
So, using the .EXE is my approach. I tested executing a small VFP EXE from the ASP.NET (using the Process class) and it worked. Now I am expanding this simple test into a real program.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform