UtilityReportListener docoid posted today

[Please reference this post if you have not previously read about VFP-TMM.]

I’m quite excited about this one: ReportListener Utility and File-handling Foundation Class.

Although you don’t usually instantiate the UtilityReportListener class directly, or haven’t so far, it provides a whole lot of important functionality within the FFC reporting group.

In SP2, it received the one major change that I can think of that doesn’t relate even indirectly to the FX subsystem: the ability to generate page image files as a secondary process while creating other report output.  This is huge, and if you don’t see why,  or think we did it just for the convenience of HTMLListener, please take a close look at the two examples I’ve provided in this docoid.

The major concepts introduced herein include the idea of a reportlistener proxy, fully-worked in one of the examples.

Referenced briefly in the same example is a very slight update to Report Preview application which works sensationally well with the new UtilityReportListener capabilities although, as you’ll see in the comments to the example, that update was hardly needed, you could do this with about three lines of code before.

Another concept I dearly wish you to grok is the idea that any application of any type that understands EMFs can serve as a preview container. (Of all the allowable page image types, EMFs are going to give you the highest quality printing, so it’s what I’d choose.  HTMLListener, meanwhile, requests GIFs by default, if I remember correctly.  This is all settable by design.)  In the other example in that docoid, I’ve just used a VFP form and an image control but .NET and WPF can host images too, so it makes no never mind.

In the  VFP form embedded-preview example, I use NET4COM to implement a “print” button.  However, you can do a much better job than that if you want to print EMFs and are using .NET components as part of the process. When I get some time and when TMM is more complete I will have to provide a better example, but it’s completely off the roadmap for now.  Besides, this is something other people can show you how to do <g>.  Maybe they’ll do it by building a better NET4COM implementation, that would be very nice and not very difficult.

Leave a Reply

Your email address will not be published.