Show Default Preview Form in a frame

Hello

I am trying to show default Preview Form in a frame

Everything is working fine but I am not able to press any button

procedure TReportEdFrm.frxReportPreview(Sender: TObject);
begin
inherited;
JvPageControl1.ActivePageIndex:=1;
TfrxPreviewForm(frxReport.PreviewForm).parent:=TabSheet2;
TfrxPreviewForm(frxReport.PreviewForm).BorderStyle:=bsNone;
TfrxPreviewForm(frxReport.PreviewForm).WindowState:=wsMaximized;
TfrxPreviewForm(frxReport.PreviewForm).FormStyle:=fsNormal;
TfrxPreviewForm(frxReport.PreviewForm).Enabled:=True;
Application.ProcessMessages;
end;


Mike
Data Transformation tools,
www.etl-tools.com

Comments

  • gpigpi
    edited 5:40AM
    Try to use TfrxPreview
    If you use TfrxPreview you must create your own toolbar and add all the buttons and then hook them to the appropriate functions
    This functions should be called by each button:
    frxPreview1.Print;
    frxPreview1.LoadFromFile;
    frxPreview1.SaveToFile;
    frxPreview1.Export(Filter);
    frxPreview1.Find;
    frxPreview1.Zoom:=frxPreview1.Zoom + 0.25;
    frxPreview1.Zoom:=frxPreview1.Zoom - 0.25;
    frxPreview1.OutlineVisible := frxPreview1.OutlineVisible;
    frxPreview1.ThumbnailVisible:=not frxPreview1.ThumbnailVisible;
    frxPreview1.PageSetupDlg;
    frxPreview1.Edit;
    frxPreview1.First;
    frxPreview1.Prior;
    frxPreview1.PageNo := 1;
    frxPreview1.Next;
    frxPreview1.Last;
    
  • edited 5:40AM
    Found a better solution using embedded forms from JVCL

    procedure TReportEdFrm.frxReportPreview(Sender: TObject);
    var EL: TJvEmbeddedFormLink;
    begin
    TfrxPreviewForm(frxReport.PreviewForm).CancelB.visible:=false;
    TfrxPreviewForm(frxReport.PreviewForm).FullScreenBtn.visible:=false;
    EL:= TJvEmbeddedFormLink.create(frxReport.PreviewForm);
    emfp.FormLink:=EL;
    inherited;
    end


    Mike
    Data Transformation tools,
    www.etl-tools.com

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.