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

TppPreview descendant

edited March 2005 in General
I created a TppPreview descendant like this:

TMyPreviewPlugin = class(TppPreview)
private
[...]
FEmailVisible:boolean;
protected
[...]

public
[...]
property EmailVisible:Boolean read FEmailVisible write
EmailVisible;
end;


Everything works perfectly. Now I would like to access the new
property. How do I access it?

This doesn't work.
(grpRpt.PreviewForm as TLendingPreviewPlugin).emailVisible := False;

Comments

  • edited March 2005
    Hi Frederic,

    The TppReport.Preview form is a TppCustomPreviewer class, not a TppPreview
    descendent. In order to expose your custom preview object, you will need to
    create and register a new TppCustomPreviewer descendent. See the
    TppPrintPreview class located in the ppPrvDlg.pas file for a starting point.
    You can see that the GetPreview method is protected. If you move this to
    the public section, you will have access to the TppPreview object from the
    report.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.