TppPreview descendant
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;
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;
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com