Solved

Delphi 6 Quick Report Zoom to fit

Posted on 2009-05-05
1
3,626 Views
Last Modified: 2013-11-22
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
Comment
Question by:Hornwood
1 Comment
 
LVL 2

Accepted Solution

by:
Bongos earned 500 total points
ID: 24315988
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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 268
Help on project with Soap 10 54
Delphi: Connect to running MS Outlook 4 84
Base1 Encode/Decode 3 77
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question