[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3940
  • Last Modified:

Delphi 6 Quick Report Zoom to fit

I have Delphi 6 pro with Quick Report 3.09

I want to default the preview to Zoomtofit and have tried the following :-

uses .... QrPrev,qrprntr,Qrctrls, QuickRpt;

QuickReport1.PrevInitialZoom := qrZoomToFit;

But keep getting PrevInitialZoom is undeclared ???

Is it possible to call this method with my versions ???


Please advise

Thanks

Shane


 
 
0
Hornwood
Asked:
Hornwood
1 Solution
 
BongosCommented:
Hi Shane

That property is not available in your version of the components (nor is it available in my D6 version 3.62 QR components). I've tried previously to have a look at this but never managed to get it to work. I've attached a snippet of what I was playing with. I was trying to control the standard QR preview window by creating my own and then setting the zoom properties or clicking the button programmatically. None of it seemed to work so I just abandoned it.

Pat
uses ......qrprntr, qrprev;
 
type
  TForm2 = class(TForm)
    QuickRep1: TQuickRep;
    PageHeaderBand1: TQRBand;
    DetailBand1: TQRBand;
    PageFooterBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    procedure QuickRep1Preview(Sender: TObject);
  private
    FPrev: TQRStandardPreview;
  public
   procedure RunReport;
  end;
 
procedure TForm2.RunReport;
begin
  quickrep1.onPreview := quickrep1Preview;
  QuickRep1.Preview;
end;
 
procedure TForm2.QuickRep1Preview(Sender: TObject);
begin
  FPrev := TQRStandardPreview.CreatePreview(Self, TQRPrinter(Sender));
  FPrev.QRPreview.ZoomToFit;
  try
    FPrev.QRPreview.ZoomState := qrZoomToFit;
    FPrev.Show;
    FPrev.QRPreview.ZoomState := qrZoomToFit;
    FPrev.QRPreview.ZoomToFit;
 
  finally
    //FPrev.Free;
  end;
end;

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now