Solved

Delphi 6 Quick Report Zoom to fit

Posted on 2009-05-05
1
3,549 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now