Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is VFP's Report Writer OOP?
Message
From
08/06/2004 10:30:41
 
 
To
08/06/2004 09:33:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00911113
Message ID:
00911163
Views:
24
Hilmar,

>I am sure happy that backwards compatibility is maintained. But I was expecting, perhaps, an "alternative" report writer to emerge eventually. Anyway, this is probably not that important.

I have seen several examples of "alternative" report writer that were built using the extensibility hooks the team put into VFP9 RW. You can hook in your own custom Report Builder through the _ReportBuilder system var, which by default holds a ref to the provided ReportBuilder.app.

At DevEssentials, Doug Hennig demonstrated a custom Report Builder that allowed him to use a template approach to adding controls -- very cool. You will see more examples of custom builders in the months to come, and can do your own if you wish.

You can do the same with _ReportOutput and _ReportPreview system vars. Also, through changing properties of a ReportListener or subclassing it to change or add methods, you can hook in at the runtime stage to alter the default print and preview behavior and change what is rendered and how it is rendered, as well as how the preview operates or where the output goes.

Near the end of the OA.htm document in Reporting section of the VFP 9 Release notes download is Section 1.2.6.4 - "Wrapping REPORT FORM with an object oriented syntax." This is a simple skeleton example of how you might instantiate a ReportListener subclass, set a few properties on it to control what report form clauses will be issued, then call a Run() method to issue the command. This example could be extended to add more properties to control more things.

It's not what you asked for in your message, but it is much, much more than we had before and gives us much more capability to extend the RW behavior, a theme you can see in other parts of the product.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform