root / UFRapSeqAliP.pas @ 3
Historique | Voir | Annoter | Télécharger (2,712 ko)
1 | 3 | avalancogn | unit UFRapSeqAliP ;
|
---|---|---|---|
2 | |||
3 | interface
|
||
4 | |||
5 | uses
|
||
6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
||
7 | Dialogs, OleCtrls, StdCtrls, ComCtrls, DB, DBClient, ExtCtrls, QRCtrls, |
||
8 | QuickRpt, QRPrntr, MidasLib, UVariables, gnugettext; |
||
9 | |||
10 | type
|
||
11 | TFRapSeqAliP = class(TForm)
|
||
12 | QRRapport: TQuickRep; |
||
13 | PHBRapport: TQRBand; |
||
14 | DBRapport: TQRBand; |
||
15 | QRLTitre: TQRLabel; |
||
16 | CDSRapport: TClientDataSet; |
||
17 | SFSeqAli: TStringField; |
||
18 | PFBRapport: TQRBand; |
||
19 | QRLUser: TQRLabel; |
||
20 | QRLWarning: TQRLabel; |
||
21 | QRLSeqAli: TQRLabel; |
||
22 | QRDBTSeqAli: TQRDBText; |
||
23 | QRLMemo: TQRLabel; |
||
24 | QRMMemo: TQRMemo; |
||
25 | QRSDDate: TQRSysData; |
||
26 | QRSEntete: TQRShape; |
||
27 | DSRelation: TDataSource; |
||
28 | CDSRegles: TClientDataSet; |
||
29 | SFIndex: TStringField; |
||
30 | IFNo: TIntegerField; |
||
31 | SFModeFin: TStringField; |
||
32 | SFAliment: TStringField; |
||
33 | QRLRegles: TQRLabel; |
||
34 | QRLNo: TQRLabel; |
||
35 | QRDBTNo: TQRDBText; |
||
36 | QRShape2: TQRShape; |
||
37 | QRLModeFin: TQRLabel; |
||
38 | QRDBTModeFin: TQRDBText; |
||
39 | QRLAliment: TQRLabel; |
||
40 | QRDBTAliment: TQRDBText; |
||
41 | QRSDRegles: TQRSubDetail; |
||
42 | QRIInraPorc: TQRImage; |
||
43 | QRLInraPorc: TQRLabel; |
||
44 | procedure FormCreate(Sender: TObject);
|
||
45 | private
|
||
46 | { D?clarations priv?es }
|
||
47 | public
|
||
48 | { D?clarations publiques }
|
||
49 | end;
|
||
50 | |||
51 | var
|
||
52 | FRapSeqAliP: TFRapSeqAliP; |
||
53 | |||
54 | implementation
|
||
55 | |||
56 | uses
|
||
57 | UStrings, UUtil, UFSeqAliP, UFPrevRap ; |
||
58 | |||
59 | {$R *.dfm}
|
||
60 | |||
61 | { TFRapSeqAliP }
|
||
62 | |||
63 | procedure TFRapSeqAliP.FormCreate(Sender: TObject);
|
||
64 | var
|
||
65 | regle : integer ; |
||
66 | begin
|
||
67 | if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
||
68 | then
|
||
69 | Font.Name := 'Arial Unicode MS';
|
||
70 | TranslateComponent(Self); |
||
71 | // Licence
|
||
72 | if IsEducation and (Length (Course) > 0) |
||
73 | then
|
||
74 | QRLUSer.Caption := Format('%s (%s)', [Course, Company])
|
||
75 | else
|
||
76 | if IsComplete or IsEducation |
||
77 | then
|
||
78 | QRLUSer.Caption := Format('%s %s (%s)', [FirstName, LastName, Company])
|
||
79 | else
|
||
80 | if IsEvaluation
|
||
81 | then
|
||
82 | QRLUSer.Caption := StrEvaluation |
||
83 | else
|
||
84 | begin
|
||
85 | QRLUSer.Caption := StrReadOnly; |
||
86 | QRLUser.Font.Color := clRed; |
||
87 | end;
|
||
88 | with CDSRapport do |
||
89 | begin
|
||
90 | CreateDataSet; |
||
91 | Append; |
||
92 | FieldValues['_SeqAli_'] := FSeqAliP.CBSeqAli.Text;
|
||
93 | Post; |
||
94 | end ;
|
||
95 | QRMMemo.Lines.Add(FSeqAliP.CBSeqAli.Hint); |
||
96 | with CDSRegles do |
||
97 | begin
|
||
98 | CreateDataSet; |
||
99 | for regle := 1 to PSeqAliP.NbRule do |
||
100 | begin
|
||
101 | Append; |
||
102 | FieldValues['_SeqAli_'] := FSeqAliP.CBSeqAli.Text;
|
||
103 | FieldValues['_No_'] := regle;
|
||
104 | FieldValues['_ModeFin_'] := FSeqAliP.StrModeFin(regle);
|
||
105 | FieldValues['_Aliment_'] := FSeqAliP.StrAliment(regle);
|
||
106 | Post; |
||
107 | end ;
|
||
108 | end ;
|
||
109 | RegisterPreviewClass(TQRPrevRapInterface); |
||
110 | // QRRapport.PreviewModal;
|
||
111 | // RegisterPreviewClass(TQRStandardPreviewInterface);
|
||
112 | end;
|
||
113 | |||
114 | end. |