properties manual

edited September 2013 in FastReport 4.0
Hello,

Is there a place where can I find a description of fastreport properties, like:

frxReport.PreviewForm
TfrxPreviewOptions

I could not find them in the usermanual and programmers manual.


(I was looking for these properties as I was trying to have the preview show on a frame, but still keep the toolbar so couldn't use tfrxPreview)

Comments

  • gpigpi
    edited 10:38PM
    You can create own toolbar or use
    unit Unit1;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, frxClass, frxPreview, ExtCtrls, StdCtrls;
    
    type
      TForm1 = class(TForm)
        Panel1: TPanel;
        frxReport1: TfrxReport;
        Button1: TButton;
        procedure frxReport1Preview(Sender: TObject);
        procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
          WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
      frmPreview : TfrxPreviewForm;
    
    implementation
    
    {$R *.dfm}
    
    procedure TForm1.frxReport1Preview(Sender: TObject);
    begin
      frmPreview := TfrxPreviewForm(frxReport1.PreviewForm);
    
      frmPreview.Parent:=Panel1;
      frmPreview.Left:=0;
      frmPreview.Top:=0;
      frmPreview.Width:=Panel1.ClientWidth;
      frmPreview.Height:=Panel1.ClientHeight;
    end;
    
    procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
      WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
    begin
         if frmPreview <> nil then
           if frmPreview.Visible then
           TfrxPreview(frxReport1.Preview).MouseWheelScroll(WheelDelta);
    end;
    
    procedure TForm1.Button1Click(Sender: TObject);
    begin
         frxReport1.PreviewOptions.Modal := False;
         frxReport1.ShowReport();
    end;
    
    end.
    
    If you use TfrxPreview you must create your own toolbar and add all the buttons and then hook them to the appropriate functions. There is no other way
    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 10:38PM
    Thank you very much

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.