Leveraging Sedna Reporting Sedna’s reporting features have made both the designing and rendering of a VFP report more extensible. In this article you’ll learn about a few of the new rendering objects that Sedna includes such as rotation and hyperlinks. You will also learn how to create your own custom rendering object and how to include a custom Builder interface element for it in the Report Designer. Visual FoxPro 9 introduced many new reporting enhancements. The most exciting aspect of these enhancements was that you could extend both the Report Designer and the Report Output engines using xBase code. Sedna will introduce even more ways to extend the VFP Reporting Engine. | " | A new Advanced tab has been added to each of the Control Properties dialog boxes.
| " |
The Report Designer now has the ability to add custom tabs to the Report Designer’s Properties dialog boxes. Prior to Sedna developers could not extend the existing Properties dialogs but they could replace them using the Event Handler Registry. This was problematic because creating a custom Properties dialog is not an easy task and different Properties dialogs, created by different developers, could not be used at the same time. Sedna’s enhancement is a welcome addition for anyone who wants to provide a user interface element in the Report Designer to accompany a custom Report rendering object they have created. Sedna also makes it easier to extend the Report Output process. REPORTOUTPUT.APP, included with Sedna, provides a way to hook into the report output using custom classes. The new classes are called Handlers and consist of two types: FX and GFX. The FX Handlers provide extended functionality to the report run but do not handle any drawing or rendering to the report canvas. A progress meter would be an example of an FX Handler. The GFX Handlers actually render to the report canvas and provide the ability to either extend the current rendering or replace it all together. Enhanced Properties Dialogs Sedna includes several new FX and GFX Handlers as well as new tabs, added to the Control Properties dialog boxes, to accompany these handlers. This provides a user interface for these Handlers at design time. The next few sections briefly discuss the new tabs included with Sedna. Document Properties Tab The FoxPro team added a new tab to the Report Properties dialog called “Document Properties” that shows a list of custom properties that you can set to either store additional information about the document or to control the report rendering into a document. Table 1 provides a brief description of the extended properties included with Sedna. The property names beginning with “HTML” are specific to HTML output and are currently only supported by the HTMLListener (included in the _ReportListener.vcx FFC library). Any ReportListener that generates documents can use the other property names. For example, if you set the custom document properties shown in Figure 1, the following text will be included with the generated HTML file if a report is rendered using the HTML Report Listener:  Figure 1: Custom Document Properties from the Report Properties dialog box.<title>My Custom Report</title> <META name="description" content="Just a few words about this report"> <META name="author" content="Bo Durban"> <META name="copyright" content="Copyright 2006 CoDe Magazine"> <META name="keywords" content="Visual FoxPro Sedna Reporting">
While this data is not visible on a Web page, this can be useful information when creating document indexes for search engines. Prior to Sedna, there wasn’t a convenient way to include this information in an HTML report document. You can add custom properties to the property list, but they won’t be recognized by the standard ReportListener. Any new custom properties must be handled by a new custom ReportListener or a custom FX or GFX Handler. |