1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
procedure TForm1.ImpressionRequete;
var
frViewA: TfrView;
frPageA: TfrPage;
frBandViewA: TfrBandView;
frReportA: TfrReport;
Gauche,Bas, OffBas,Largeur,Hauteur, HauteurChar:integer;
begin
Gauche := 10;
Bas:=32;
Largeur:=740;
Hauteur:=40;
HauteurChar := 16;
OffBas := 5;
frReportA := TfrReport.Create(Self);
frReportA.Pages.Clear;
frReportA.Pages.Add;
frPageA:=frReportA.Pages[0];
frBandViewA := TfrBandView(frCreateObject(gtBand, '',frPageA));
frBandViewA.SetBounds(Gauche,Bas,Largeur,Hauteur);
frBandViewA.BandType := btReportTitle;
frPageA.Objects.Add(frBandViewA);
frViewA := TfrView(frCreateObject(gtMemo, '',frPageA));
frViewA.SetBounds(Gauche,Bas+OffBas,Largeur,HauteurChar);
frViewA.Memo.Add('Requête du: '+DateToStr(Date));
TfrMemoView(frViewA).Font.Size := 10;
TfrMemoView(frViewA).Font.Bold := True;
TfrMemoView(frViewA).Alignment := taCenter;
frPageA.Objects.Add(frViewA);
Bas := Bas*3;
frBandViewA := TfrBandView(frCreateObject(gtBand, '',frPageA));
frBandViewA.SetBounds(Gauche,Bas,Largeur,Hauteur div 2);
frBandViewA.BandType := btMasterData;
frBandViewA.DataSet:='frDBDataSet1';
frPageA.Objects.Add(frBandViewA);
frViewA := TfrView(frCreateObject(gtMemo, '',frPageA));
frViewA.SetBounds(Gauche,Bas+OffBas,Largeur,HauteurChar);
frViewA.Memo.Add('[Data.SQLQuery1."ART_REFERENCE"]');
frPageA.Objects.Add(frViewA);
frViewA := TfrView(frCreateObject(gtMemo, '',frPageA));
frViewA.SetBounds(Gauche+300,Bas+OffBas,Largeur,HauteurChar);
frViewA.Memo.Add('[Data.SQLQuery1."ART_REFERENCE"]');
frPageA.Objects.Add(frViewA);
frReportA.ShowReport;
end; |
Partager