Hi Leigh,
and if I want to use standard dialog?
With #PreviewDlg instead of #rpPrintPreviewDlg I get similar message:
Code: Select all
The following error was encountered while reporting:
Invalid Print Preview Object: PREVIEWDLG
Object of type 'ReportPro2.RpPrinter' cannot be converted to type 'XSharp.__Usual[]'.
CallStack:
RPTSUMMEN:.CTOR (37)
...
Code: Select all
oPrinter := RpPrinter{oWindow, SELF}
oPrinter:PrintPreview("Job","File","Caption","Mess",TRUE,FALSE,FALSE,SW_SHOWNORMAL,ZOOM_100,#PreviewDLG)
...
CLASS PreviewDlg INHERIT ReportPro2.rpPrintPreviewDlg
METHOD Init(oParent,oPrinter,cCaption,lModal,ptrPlacement,nShowState,lLandScape,nZoom)
SUPER:Init(oParent,oPrinter,cCaption,lModal,ptrPlacement,nShowState,lLandScape,nZoom)
SELF:Caption := cCaption
// here you can delete the default buttons
// and add yours
RETURN SELF
END CLASS