rbWiki > Output > Preview > How To...Hide the Preview Toolbar Buttons

How To...Hide the Preview Toolbar Buttons

Table of contents
  1. 1. Question 
  2. 2. Solution

Question 

"How do I control the toolbar buttons of the preview window in ReportBuilder?" 

Solution

Use the OnPreviewFormCreate event to access the preview button pass-thru properties and control them any way you need.  You will need to type cast the TppReport.PreviewForm property to a TppPrintPreview object to access the button properties.

Download: PreviewHideButtons.zip 

Sample Delphi code:

uses
  ppPrvDlg; 

procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin

  //Hide Print Button
  TppPrintPreview(ppReport1.PreviewForm).PrintButton.Visible := not(CheckBox1.Checked);

end;
Tags
none

Files (0)

 
You must login to post a comment.