trichview.com

trichview.support




Re: Printing from PrintPreview


Return to index


Author

Message

Anderson Wilson

Posted: 06/06/2005 22:41:52


Sorry, the problem is not with the assignment of AACtionPrint but when

the Execute method is called in:


if (PreviewForm.ShowModal=mrOk) and (AActionPrint<>nil) then

  AActionPrint.Execute;


Shouldn't be


AActionPrint.ExecuteTarget(Target);


?????


Anderson




Anderson Wilson wrote:

> Hi,

>

> procedure TfrmMD.PrintBtnClick(Sender: TObject);

> begin

>   rvActionsResource.rvActionPrint1.ExecuteTarget(RichViewEdit1);

> end;

>

> procedure TfrmMD.PrintPreviewBtnClick(Sender: TObject);

> begin

>   rvActionsResource.rvActionPrintPreview1.ActionPrint :=

>                                   rvActionsResource.rvActionPrint1;

>   rvActionsResource.rvActionPrintPreview1.ExecuteTarget(RichViewEdit1);

> end;

>

> When PrintBtnClick is called, it shows the Print Dialog and the document

> is printed. No problems here.

>

> When PrintPreviewBtnClick is called, it shows the preview of the

> document ok, but when I click on the printer button at TfrmRVPreview the

> PrintDialog does not show, although ActionPrint is assigned.

>

> When I debug RichViewActions

>

> procedure TrvActionPrintPreview.ExecuteTarget(Target: TObject);

> begin

>   AActionPrint := GetActionPrint;

>

> GetActionPrint returns nil!!!!

>

> Please, could you tell me what am I doing wrong?

>

> Thanks

>

> Anderson





Powered by ABC Amber Outlook Express Converter