Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where should the reports go?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Where should the reports go?
Miscellaneous
Thread ID:
00154348
Message ID:
00154348
Views:
52
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

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform