Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Creating a Custom Preview

edited September 2001 in General
I need to create a custom preview form for my project. What I'd like to do
is create just a blank form that shows only the preview window. The project
I'm creating this for does not allow mouse interaction, so I need to be able
to not have buttons on the Preview form, and I need to be able to handle key
presses for scrolling, changing pages, etc. These things I believe I can do
fairly easily, however what I need to know is this:

How do I actually create the form? I've been looking at ppPreview as an
example. I created a new form in my project, then descended it from
TppCustomPreview, however I get this error when I compile:
[Error] TCD.dpr(477): Incompatible types: 'TComponentClass' and 'Class
reference'

I have included ppPreview in the uses clause of my new form's unit. So how
do I get started? I also have tried looking in the user's manual for Report
Builder, however the example tutorials seem to be a little out of date.

For reference:
Delphi 5.0
Report Builder 6.02

Thanks!

PS - if this is not the appropriate newgroup for Preview questions, please
direct me to the appropriate group.

Comments

  • edited September 2001
    Create a class which descends from TppCustomPreview, just like TppPreview
    does, but without the buttons. Create a form and pass the form in the
    constructor of your preview class. The form will become the parent of the
    preview and this is available in your subclass by accessing the inherited
    TppCustomPreview.Parent property.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.