Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where should the reports go?
Message
De
04/11/1998 23:52:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00154348
Message ID:
00154669
Vues:
13
Paul,
I suspect this is a dilemma that many Programmers have. I have posted a thread asking for if anyone has developed a Good report manager class (Thread #153407 Message #153407). Since there has been no responses, I am creating a report manager class that suits my needs. My suggestion for you is to create a separate class that handles the Reports for your framework. The manager can then run in a private data session, you could even make it a ‘dll’ or ‘com’ so that they run separate from the main application and not interfere with the users. When I finish my Report Manager, I will try and post it on UT.
Good Luck. Glenn

All I'm trying to decide where I should put reports I create. I've got a few different classes that handle different aspects of my program. As an example, I have an "Invoice" class that handles all of the invoices in the system. I've got a number of reports that will need to use this class to generate reports.

Should I create a new class for each report? Or should I create a "Report" class that handles all of my reports? Currently in the Invoice class I have a Print() method, a "ReportType" property, and a "ReportName" property. The ReportType can accept a report #, the ReportName has the actual FoxPro report file name (this is just for expandability - I haven't actually passed the file names to this object). This seems OK for reports that directly use the Invoice class - for instance, printing the invoice :) but doesn't seem quite right for more generalized reports - like a list of all the Invoices during a period.

What if I created a new class for each "Specialized" report type. This class would create any objects it needs to generate the report, then create a cursor (or temp table) and calls the Report form (or Crystal Reports). Does this seem reasonable? What else should I consider?

Thanks,
-Paul
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform