TppCustomPreview
Hi All,
I'm having a little trouble with TppPreview. The report object is read only
and surprisingly there is no preview method. I am using this as ancestor
class so I can write my own preview method. I would like to know what the
'official line' is on passing the report to the object, do we assign to
TppPreview.Viewer.Report as before? Also, before I was using
TppCustomPreview/TppPreview, to preview a report I would assign the report
to the viewer then call TppViewer.FirstPage, is this correct and is this
still the way to do it? I'm not finding the documentation too helpful (it
usually is) and I cant fathom it from the designer code which I usually use
as an example of most things.
Thanks in advance
AndyFlan
I'm having a little trouble with TppPreview. The report object is read only
and surprisingly there is no preview method. I am using this as ancestor
class so I can write my own preview method. I would like to know what the
'official line' is on passing the report to the object, do we assign to
TppPreview.Viewer.Report as before? Also, before I was using
TppCustomPreview/TppPreview, to preview a report I would assign the report
to the viewer then call TppViewer.FirstPage, is this correct and is this
still the way to do it? I'm not finding the documentation too helpful (it
usually is) and I cant fathom it from the designer code which I usually use
as an example of most things.
Thanks in advance
AndyFlan
This discussion has been closed.
Comments
controls that allow the previewer to tell the viewer to goto the first page
or last page or change the zoom setting...etc. What are you trying to do?
Can it not be done with the current preview? Are you trying to use the
TppViewer component on a form with a TppPreview createing the controls? The
old way of replacing the preview form is still valid. See the main reports
demo project which registers a replacement form. You could take this
approach if you want to use a custom viewer component on the form.
Otherwise, you'll need to register a replacement TppPreview descendent and
let the report preview through the standard preview form. However, you won't
be able to access this object from the outside world once it is created,
though you can get at the contorls by using their assigned tag properties
which coincide for the preview action enumerated type. Here's an example of
creating a preview plugin replacement:
http://www.digital-metaphors.com/tips/HidePrintButtonPlugin.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks, i'll look at the example. Yes, I'm trying to use a TppCustomPreview
descendant to manage my previews. At the moment we want to use your class
TppPreview for this until we have the time to put resources into creating
our own. I think I misunderstand the relationship between the report class
and the TppCustomPreview class. Is the report creating TppPreview when
Print is called and the device is dtScreen?
Andrew Flannery
and register it, it will be used internally as the currently registered
preview by the report when I call print. Does that sound correct?
Andrew Flannery
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com