Page 1 of 1

PrintPreview usage from main program

PostPosted: March 13th, 2018, 10:27 am
by bruce
Hi Guys

The PrintPreview looks excellent but the examples show the usage where the preview is central to the main program. I most cases, I find that my programs have a few different kinds of reports.

So, my question is: How do you see the tool being used in a general way to preview multiple reports?

My approach is to create a Delphi form with a preview component, menu, toolbar and statusbar. I create a public function that assigns a method to a private variable FRenderReport procedure. In the form OnShow event, I call FRenderReport.

The problem is, the render procedures need the canvas and the bounds. So, I send the PrintPreview as a parameter to render. It works !!! but it feels very kludgy.

I'm interested to know how you expect the tool to be used in this kind of app.

Cheers
Bruce