Product Review: Report and Presentation Manager (RPM)
Posted June 26 2009
Reporting has long been one of Clarion's great strengths, but there's always room for improvement, often in the form of third party tools. One of the longest-serving reporting add-ons is Lodestar Software's Report and Presentation Manager XT, better known in the Clarion community simply as RPM. You may be more familiar with Lodestar Software's founder Lee White, who is also the man behind the legendary "etc" Clarion conferences held in Gatlinburg Tennessee from 1998-2004. For a number of years Lee also ran DeveloperPlus, an online store for Clarion third party products.
RPM is primarily, as its name suggests, a presentation tool, not a report creation tool. For the most part, you still create reports the way you always have and your application generates the reports as before. And really that's where standard Clarion reporting begins to break down. If you use the standard report handling functionality built into the templates, and for instance you want to change the report target to a different printer or perhaps to a PDF printer driver, you have to change the printer options before you print the report. The previewer is fairly primitive, there's no easy way to tag individual pages for printing, you can't search for report text, and on and on.
There's an opportunity, however, for your app to do a lot more with reports. That's because Clarion creates reports as WMF objects. WMF stands for Windows MetaFile, a Microsoft file format that allows for text as well as graphics. Specifically, the report engine creates Aldus Placeable Metafiles.
RPM operates on these WMF files, providing numerous options for viewing, searching, manipulating and printing.
Here's a short list of RPM's features:
- Previewing one, two, four or six pages at a time, with fully scrollable zoom
- Keyboard or mouse navigation
- Mark individual pages or ranges
- Delete pages individually or by marks
- Text search
- Specify the report destination
- Support for number of copies (even if not supported by the report destination)
- Support for duplex printing (even if not supported by the report destination)
- Reverse print order
- Selective printing
- Archive and retrieve reports
- Page renumbering including "page of pages"
- Segmented renumbering (i.e. numbering of subsections within a report)
- Page shuffle
- Report merging and appending
- Export to ASCII
- Multiple report preview
- User-specific reporting options
- "No records" report
RPM also has support for newspaper-style columns, where text flows in columns from top to bottom, then left to right. Newspaper Column Reports (NCR) can be applied to existing reports with some modification. Several pre-defined reports are included, and you can have as many as sixteen columns. I'll talk about NCR a bit more later on.
RPM is available for Clarion 6.x and Clarion 7 (older versions are still available for download but not supported). When you purchase RPM you'll receive an email containing the login details for the CWAddons product page. Figure 1 shows the portion of the page that applies to RPM. Note that there are separate installs not just for C6 and C7 but also for the various versions of C6. Also make note of your unlock codes; the C7 version uses a combination of an unlock code and a password, while the C6.x version expects a password and a serial number.
I first installed RPM for C6 on a Vista Business 32 bit virtual machine. (Actually, being a bit slow on the uptake I actually started installing RPM for C7 against C7 on that machine - it wasn't until I got to the security dialog that I realized my mistake.)
Figure 1. The download page
Note that all versions of RPM listed on the page support both ABC and Legacy templates, but something called eXtended Targets is only available for ABC at present. This relates to Clarion's built-in support for sending reports to PDF, XML, HTML and text; as with NCR I'll have more to say about eXtended Targets a little later. RPM also integrates with other third party reporting products, including CPCS, Taboga, PDF-Tools and Office Inside.
Figure 2. Starting the installer
As Figure 2 suggests, Lee continues to improve RPM over time.
Figure 3. Entering your password and serial number.
Figure 4. The EULA
I have C6 installed in an odd location; yours will most likely be in \Clarion6 or \C6.
Figure 5. Choosing the install folder
In Figure 6 I've only chosen to install the ABC support, as I no longer do any Legacy development.
Figure 6. Selecting components
As in Figure 7, the default installation for RPM in C6.x is in a directory under the Clarion directory, but you can easily change this to an install under the 3rdParty directory if you wish, or you can specify the directories manually.
Figure 7. Confirming the install folders
Figure 8. Setting the backup folder
NCR support ideally includes default report structures which you can use when creating new newspaper column style reports. Unfortunately, the only way to get these default structures into the development environment is to modify the shipping DEFAULTS.CLW file (Figure 9).
Figure 9. Installing predefined reports for NCR
RPM provides support for customized translations; if you've done this kind of work you'll probably want to preserve your work (Figure 10).
Figure 10. Translation options
At last the install is ready to go (Figure 11).
Figure 11. Ready to install
On my machine the actual installation just took a few seconds.
Figure 12. The install has completed.
There's a most important notice in Figure 12: "You must register the templates listed below before they can be used." Lee recently switched to SetupBuilder which has support for registering Clarion templates; the C7 version does install the necessary templates, but the C6 install hasn't yet been converted to SetupBuilder.
Using the templates
To apply RPM to your existing reports you add a global extension to enable RPM features, and then a procedure extension on each report.
First, go to the global extensions list and under Class Lodestar_RPM add the rpm_ReportManager template (Figure 13).
Figure 13. Adding the global extension
Figure 14 shows the global extension properties, Gnrl (General) tab.
Figure 14. RPM global options
The following figures show the various global configuration options.
Figure 15. Messages and operations settings
Figure 16. Report archiving settings
Figure 17. Layout options for four-up printing
Figure 18. Global watch variable settings
To begin with you can leave the global settings at the default values, although you might want to pay particular attention to the Watch tab options. Here you can specify a variable RPM will use to determine how it should handle printing the current reports. The Help is a little more verbose about the meaning of these settings:
0 Use options as setup on template
1 PRINT after selecting a printer
2 PRINT with current printer
3 PRINT after selecting a printer, use the RPM final destination dialog
4 PRINT with current printer, use the RPM final destination dialog
5 PREVIEW after selecting a printer
6 PREVIEW with current printer
Options to print using the current printer are not recommended, since they don't give the user the option of choosing a printer first.
By creating your own watch variable you can easily override the use of printer selection dialogs on a case by case basis.
Applying RPM to an existing report
After adding the global extension to your application, all you need to do to use RPM with an existing report is to add the rpm_STANDARD_RPT extension template to that report procedure (Figure 18).
Figure 18. Adding RPM to an existing report
Again, there are a bunch of options available. The Gnrl tab (Figure 19) contains the basic settings to determine how, when and if you ask the user about where the report is to be printed. There are also options available via buttons on this tab to specify how many PRINT statements per timer event, hiding/disabling of specific print and preview options, enable two-up and four-up printing, allow popup menus, setting custom switches, and much more.
Figure 19. General settings
Figure 20. Report archiving settings
Figure 21. Export settings
Figure 22. Page renumbering
One of the long-standing issues with Clarion reports is the inability to specify a "page of pages" numbering scheme. That's because the Clarion report engine does no post-processing, and it doesn't know the page total until after the report has completed. RPM does much of its magic by post-processing the WMF files created by the report engine, so as long as you specify an appropriate string control on the report RPM can provide "page of pages" numbering.
Figure 23. Saving WMFs
If you wish you can force your application to save WMF files. As an alternative to this template option you can use the rpm_SaveWMF and rpm_ExitReport templates.
Figure 24. Text search options
Figure 25. Handling empty reports
You can find out more about these template options in the RPM Help, which is supplied in PDF, CHM and HLP formats and is also available online.
Again, to start with you might simply want to accept the default values.
If you use the default settings, after your report generates you'll see the RPM previewer instead of the stock previewer. For comparison purposes, Figure 26 shows the stock previewer for the Products list report in the Invoice sample application.
Figure 26. The stock previewer
Figure 27 shows the same report in the RPM previewer.
Figure 27. The RPM previewer
Both the stock previewer and the RPM previewer let you zoom in and out but the RPM previewer gives you finer-grained control. You can use the left and right mouse buttons to move in and out in 5% increments, and there are toolbar buttons to fill to page width or page height. There are also buttons to show two, four and six pages at once. The stock previewer does have page tiling capability but it's far more difficult to use.
Navigation options on the RPM previewer toolbar include first, last, next and previous page, as well as a go to specific page number button.
RPM adds a powerful page marking feature. In Figure 28 (one of the RPM sample reports) I went through the report page by page and pressed the spacebar to mark/unmark individual pages. I then pressed the six page view button.
Figure 28. Marking pages
You can also mark directly from the two, four or six page view by right-clicking on individual pages.
At first I found the two, four and six page buttons a little confusing, since they are really toggles. I was expecting to press another button to return to single page view, and instead found myself inadvertently closing the report.
Of the first six pages shown only three are marked for printing. If I click on the Print button I'll see the Report Destination window (Figure 29) which indicates that three marked pages will be printed.
Figure 29. Printing marked pages
The Options tag (Figure 30) lets me specify copies, collation, and duplex printing, as well as two up or four up printing.
Figure 30. Printing options
The range selection toolbar buttons let you select a range, unmark all, or mark all pages. If you choose to select a range you'll see the dialog in Figure 31, which lets you delete unmarked pages.
Figure 31. Selecting a range of pages.
Similarly, the search option lets you tag pages where the search term is found, and optionally you can delete all other pages.
Figure 32. Search options
Early on I noticed a problem with reports coming up maximized. For purposes of screen shots I preferred a non-maximized state, but the report was forced to maximized. I asked Lee about this, and he told me to check the Threaded with Start or Initiate Thread option on the procedure extension template. Once that was checked the report started on its own thread and I could change the window state without difficulty. Lee also pointed out that I could set that option on the Defaults for Next Use button on the global extension template. Changes here affect any extension templates populated after you make those changes, so it's probably worth your while to study the default options early on and set those options you think you're likely to need.
The pre-destination dialog
If on the template Gnrl options you check Include RPM PRE-destination Dialog then before any report is processed you'll see the window in Figure 33.
Figure 33. The pre-destination dialog
If you choose Preview (the default) the report will be displayed from the RPM previewer, from where it can subsequently be printed. If you choose Print then the previewer is skipped and you're taken to the Report Destination window.
NCR stands for Newspaper Column Report, in which you can have reports that run in columns from top to bottom, then left to right, across the page. Figure 34 shows the example NCR report.
Figure 34. An NCR report
As you can see there are three columns of data, each made up of a name and a phone number.
The help goes into the details of creating NCR reports, but in essence this is a report in which only the first column is populated. Your report structure does not include any columns beyond that first column. Instead, you specify the number of columns via the NCR_STANDARD extension template. Print preview must be turned on, since RPM again does its magic by manipulating the generated WMF files, consolidating a longer single-column report into a shorter multi-column report. All the usual page numbering (and renumbering) options are available.
Extended target support
A few releases back, SoftVelocity added the ability to print reports to PDF, XML, HTML and text. RPM integrates with this functionality via its eXtended Target support (which is the XT in RPM XT). If you are using one or more of SoftVelocity's report extensions, or extensions from a third party vendor, the Report Destination dialog will be displayed (Figure 35).
Figure 35. Report Destination with PDF and XML support
Any extended targets will be displayed at the top of the Report Destination window - just click on a target to redirect the output.
RPM's eXtended Target functionality supports appended reports (a standard feature of RPM), i.e. appended, shuffled and inserted reports can be previewed, sent to extended targets and printed. This is also supported for archived and retrieved reports.
Extended targets can be reused for different purposes. You might want to have a PDF option for a report as well as an option to email that PDF as an attachment.
You can create your own extended target if you wish. Just define it as a routine or procedure within RPM and it will be called from the report procedure; in fact, any procedure that's accessible by the report can be called from the preview, final destination or pre-destination dialog. Targets can be forced without user intervention and the report can be closed or sent to preview. In other words, RPM's eXtended Target support is highly flexible.
Other features, future features
I don't have the space here to cover all of RPM's features. In particular, I haven't touched on report archiving, combining multiple reports into a single report, or exporting. RPM plays nice with a number of other third party reporting products such as CPCS' Creative Reporting Tools.
If you've ever used Quicken you'll appreciate drill-down reporting, currently available only in the C7 version (but will be back-ported to C6). You can assign sub-reports to items in a report so you can click on those items and "drill down" to detailed information. And you're not limited to reports; these links can bring up browses, forms or whatever.
There are some differences in the UI between C6 and C7, and a revamped UI is currently under development. Lee provided me with a screen shot showing some of the user interface changes.
The top two toolbars are the current C7 design, with the second one showing drill-down activated. The third toolbar is the original toolbar, before drill-down, and the fourth toolbar shows the concept for the new UI which has not yet been released.
Figure 36. Toolbar versions
RPM fully supports Clarion 7, and the new installer (built with SetupBuilder) does install the RPM template chain. Inadvertently I ran the install while I had an application open and the IDE still successfully registered the template.
Lodestar Software's RPM replaces the bare-bones previewing functionality included with the shipping templates, but it's far more than just a previewer with an extensive list of features including (but not limited to) searching, numbering, archiving, printing, shuffling, and merging reports. RPM integrates with the newer extended report targets from SoftVelocity and other vendors and also adds newspaper-style columns and "drill down" reporting.
The only real weakness I came across in RPM was that it lacked a section in the documentation that gave me the big picture of what RPM could do. The docs are quite extensive, and there are helpful "getting started" and "how to..." sections, but it took me a while to build a model in my mind of all of RPM's capabilities. An introductory section with a bunch of screen shots showing what can be achieved with RPM would be a big help.
That said, if you take the time to dig into the docs you'll soon realize that RPM is considered one of the classic Clarion third party addons for good reason.
RPM is sold on an updates-by-subscription basis. A new single developer license is $168 and includes one year of updates. RPM does incorporate "black box" DLLs. A portion of the source code is available; as noted below this will increase over time.
Lodestar Software also sells the Automated Fax Engine (AFE), US Postnet Barcodes (PNet) and a standalone edition of Newspaper Column Reports (NCR). A new subscription plan for all of Lodestar's products is $271 including one year of updates.
For more information or to purchase RPM contact Lodestar Software via the CWAddons web site.
There are many things currently happening with RPM. In addition to the new user interface that’s waiting in the wings I’m working on improved support for Fomin Reports and integration of RPM text export and archive to better fit the extended target metaphor. Also the back porting of drill-down support to Clarion 6 versions is under way, as is drill-down and eXtended Target support for the legacy (pc: “Clarion”) template family.
Although current releases provide a marginal portion of RPM as source, for translation and look & feel changes, it is by no means the majority. Future releases will uncover more and more of the source behind the curtains until, with the new UI release, all but a small portion - the RPM print engine - will be provided as source and eventually even it will be. This source, if I can pull it off, will be in APP format for easier modification and support. Stay tuned!
Post a comment
You must be logged on to post comments.
From the archives
8/17/2011 12:00:00 AM
When Nardus Swanevelder saw the MDI Tab Option in the application manifest settings, he knew this was something that he could use in his applications. But he wishes this feature had been called the "Open Window Toolbar."