unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QuickRpt, QRCtrls, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
Button1: TButton;
procedure QRLabel1Print(sender: TObject;
var Value: string);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.QRLabel1Print(sender: TObject;
var Value: string);
begin
QRLabel2.Caption:=copy(Value,pos('^', Value) + 1,maxint) ;
Value := copy(Value, 1, pos('^', Value) - 1);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
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
PixelsPerInch = 96
TextHeight = 13
object QuickRep1: TQuickRep
Left = 232
Top = 40
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 = 50
Top = 8
Width = 113
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
132.291666666667
21.1666666666667
298.979166666667)
Alignment = taRightJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = '2^3'
Color = clWhite
OnPrint = QRLabel1Print
Transparent = False
WordWrap = True
FontSize = 10
end
object QRLabel2: TQRLabel
Left = 163
Top = 3
Width = 48
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
431.270833333333
7.9375
127)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Caption = 'QRLabel2'
Color = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
Transparent = False
WordWrap = True
FontSize = 8
end
end
end
object Button1: TButton
Left = 104
Top = 88
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
end