unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, QuickRpt, QRCtrls, ExtCtrls, QRPrev;
const
My_Msg_display = wm_user + 400;
type
TForm1 = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
QRLabel1: TQRLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormChange(Sender: TObject);
procedure MyZoomClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
end;
procedure TForm1.FormChange(Sender: TObject);
begin
if screen.ActiveForm = nil then
exit;
if sametext('TQRStandardPreview', screen.ActiveForm.ClassName) then
begin
TQRStandardPreview(screen.ActiveForm).ZoomToWidth.OnClick := MyZoomClick;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
screen.OnActiveFormChange := FormChange;
end;
procedure TForm1.MyZoomClick(Sender: TObject);
begin
if screen.ActiveForm = nil then
exit;
if sametext('TQRStandardPreview', screen.ActiveForm.ClassName) then
begin
TQRStandardPreview(screen.ActiveForm).QRPreview.Zoom := 200;
end;
end;
end.
object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Scaled = False
WindowState = wsMaximized
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object QuickRep1: TQuickRep
Left = 24
Top = 120
Width = 794
Height = 1123
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Functions.Strings = (
'PAGENUMBER'
'COLUMNNUMBER'
'REPORTTITLE')
Functions.DATA = (
'0'
'0'
'''''')
Options = [FirstPageHeader, LastPageFooter]
Page.Columns = 1
Page.Orientation = poPortrait
Page.PaperSize = A4
Page.Values = (
100
2970
100
2100
100
100
0)
PrinterSettings.Copies = 1
PrinterSettings.Duplex = False
PrinterSettings.FirstPage = 0
PrinterSettings.LastPage = 0
PrinterSettings.OutputBin = Auto
PrintIfEmpty = True
SnapToGrid = True
Units = MM
Zoom = 100
object TitleBand1: TQRBand
Left = 38
Top = 38
Width = 718
Height = 40
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
AlignToBottom = False
Color = clWhite
ForceNewColumn = False
ForceNewPage = False
Size.Values = (
105.833333333333
1899.70833333333)
BandType = rbTitle
object QRLabel1: TQRLabel
Left = 88
Top = 16
Width = 58
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
232.833333333333
42.3333333333333
153.458333333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Caption = 'QRLabel1'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 10
end
end
end
object Button1: TButton
Left = 96
Top = 64
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
end