root / UFRapAliAG.pas @ 3
Historique | Voir | Annoter | Télécharger (6,599 ko)
1 |
unit UFRapAliAG ;
|
---|---|
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 |
TFRapAliAG = class(TForm)
|
12 |
QRRapport: TQuickRep; |
13 |
PHBRapport: TQRBand; |
14 |
DBRapport: TQRBand; |
15 |
QRLTitre: TQRLabel; |
16 |
QRLAliment: TQRLabel; |
17 |
CDSRapport: TClientDataSet; |
18 |
PFBRapport: TQRBand; |
19 |
QRLUser: TQRLabel; |
20 |
QRLWarning: TQRLabel; |
21 |
QRLMemo: TQRLabel; |
22 |
QRMMemo: TQRMemo; |
23 |
QRSDDate: TQRSysData; |
24 |
QRSEntete: TQRShape; |
25 |
SFAliment: TStringField; |
26 |
QRDBAliment: TQRDBText; |
27 |
QRLTAG: TQRLabel; |
28 |
QRLC6C8C10: TQRLabel; |
29 |
QRDBTTC6C8C10_Tot: TQRDBText; |
30 |
QRLCompo: TQRLabel; |
31 |
QRLTot: TQRLabel; |
32 |
QRDBTTC6C8C10_0: TQRDBText; |
33 |
QRL0: TQRLabel; |
34 |
QRL1: TQRLabel; |
35 |
QRL2: TQRLabel; |
36 |
QRL3: TQRLabel; |
37 |
QRL4: TQRLabel; |
38 |
QRL5: TQRLabel; |
39 |
QRL6: TQRLabel; |
40 |
QRLC14: TQRLabel; |
41 |
QRDBTTC14_Tot: TQRDBText; |
42 |
QRDBTTC14_0: TQRDBText; |
43 |
QRLC18: TQRLabel; |
44 |
QRDBTTC18_Tot: TQRDBText; |
45 |
QRDBTTC18_0: TQRDBText; |
46 |
QRDBTTC18_1: TQRDBText; |
47 |
QRDBTTC18_2: TQRDBText; |
48 |
QRDBTTC18_3: TQRDBText; |
49 |
QRDBTTC18_4: TQRDBText; |
50 |
QRLC22: TQRLabel; |
51 |
QRDBTTC22_Tot: TQRDBText; |
52 |
QRDBTTC22_0: TQRDBText; |
53 |
QRDBTTC22_1: TQRDBText; |
54 |
QRDBTTC22_5: TQRDBText; |
55 |
QRDBTTC22_6: TQRDBText; |
56 |
QRLCTot: TQRLabel; |
57 |
QRDBTTCTot_Tot: TQRDBText; |
58 |
QRDBTTCTot_0: TQRDBText; |
59 |
QRDBTTCTot_1: TQRDBText; |
60 |
QRDBTTCTot_2: TQRDBText; |
61 |
QRDBTTCTot_3: TQRDBText; |
62 |
QRDBTTCTot_4: TQRDBText; |
63 |
QRDBTTCTot_5: TQRDBText; |
64 |
QRDBTTCTot_6: TQRDBText; |
65 |
QRLC12: TQRLabel; |
66 |
QRDBTTC12_Tot: TQRDBText; |
67 |
QRDBTTC12_0: TQRDBText; |
68 |
QRLC16: TQRLabel; |
69 |
QRDBTTC16_Tot: TQRDBText; |
70 |
QRDBTTC16_0: TQRDBText; |
71 |
QRDBTTC16_1: TQRDBText; |
72 |
QRLC20: TQRLabel; |
73 |
QRDBTTC20_Tot: TQRDBText; |
74 |
QRDBTTC20_0: TQRDBText; |
75 |
QRDBTTC20_1: TQRDBText; |
76 |
QRDBTTC20_4: TQRDBText; |
77 |
QRDBTTC20_5: TQRDBText; |
78 |
QRLC24: TQRLabel; |
79 |
QRDBTTC24_Tot: TQRDBText; |
80 |
QRDBTTC24_0: TQRDBText; |
81 |
QRLLip: TQRLabel; |
82 |
QRDBTLip: TQRDBText; |
83 |
QRLAGsLip: TQRLabel; |
84 |
QRDBTAGsLip: TQRDBText; |
85 |
SFAGsLip: TStringField; |
86 |
SFC6C8C10_0: TStringField; |
87 |
SFLip: TStringField; |
88 |
SFC14_0: TStringField; |
89 |
SFC6C8C10_Tot: TStringField; |
90 |
SFC16_0: TStringField; |
91 |
SFC18_0: TStringField; |
92 |
SFC20_5: TStringField; |
93 |
SFC22_6: TStringField; |
94 |
SFC24_0: TStringField; |
95 |
SFC12_0: TStringField; |
96 |
SFC12_Tot: TStringField; |
97 |
SFC14_Tot: TStringField; |
98 |
SFC16_1: TStringField; |
99 |
SFC16_Tot: TStringField; |
100 |
SFC18_1: TStringField; |
101 |
SFC18_2: TStringField; |
102 |
SFC18_3: TStringField; |
103 |
SFC18_4: TStringField; |
104 |
SFC18_Tot: TStringField; |
105 |
SFCTot_1: TStringField; |
106 |
SFC20_Tot: TStringField; |
107 |
SFC22_Tot: TStringField; |
108 |
SFC20_0: TStringField; |
109 |
SFC22_0: TStringField; |
110 |
SFC20_1: TStringField; |
111 |
SFC20_4: TStringField; |
112 |
SFC22_1: TStringField; |
113 |
SFC22_5: TStringField; |
114 |
SFC24_Tot: TStringField; |
115 |
SFCTot_Tot: TStringField; |
116 |
SFCTot_2: TStringField; |
117 |
SFCTot_3: TStringField; |
118 |
SFCTot_4: TStringField; |
119 |
SFCTot_5_: TStringField; |
120 |
SFCTot_6: TStringField; |
121 |
SFCTot_0: TStringField; |
122 |
QRIInraPorc: TQRImage; |
123 |
QRLInraPorc: TQRLabel; |
124 |
procedure FormCreate(Sender: TObject);
|
125 |
private
|
126 |
{ D?clarations priv?es }
|
127 |
public
|
128 |
{ D?clarations publiques }
|
129 |
end;
|
130 |
|
131 |
var
|
132 |
FRapAliAG: TFRapAliAG; |
133 |
|
134 |
implementation
|
135 |
|
136 |
uses
|
137 |
UStrings, UCalcul, UUtil, UFAliment, UFPrevRap ; |
138 |
|
139 |
{$R *.dfm}
|
140 |
|
141 |
{ TFRapAliAG }
|
142 |
|
143 |
procedure TFRapAliAG.FormCreate(Sender: TObject);
|
144 |
begin
|
145 |
if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
146 |
then
|
147 |
Font.Name := 'Arial Unicode MS';
|
148 |
TranslateComponent(Self); |
149 |
// Licence
|
150 |
if IsEducation and (Length (Course) > 0) |
151 |
then
|
152 |
QRLUSer.Caption := Format('%s (%s)', [Course, Company])
|
153 |
else
|
154 |
if IsComplete or IsEducation |
155 |
then
|
156 |
QRLUSer.Caption := Format('%s %s (%s)', [FirstName, LastName, Company])
|
157 |
else
|
158 |
if IsEvaluation
|
159 |
then
|
160 |
QRLUSer.Caption := StrEvaluation |
161 |
else
|
162 |
begin
|
163 |
QRLUSer.Caption := StrReadOnly; |
164 |
QRLUser.Font.Color := clRed; |
165 |
end;
|
166 |
with CDSRapport do |
167 |
begin
|
168 |
CreateDataSet; |
169 |
Append; |
170 |
FieldValues['_Aliment_'] := FAliment.CBAliment.Text;
|
171 |
FieldValues['_C6C8C10_0_'] := FAliment.PBC6C8C10_0.Text;
|
172 |
FieldValues['_C6C8C10_Tot_'] := FAliment.PBC6C8C10_tot.Text;
|
173 |
FieldValues['_C12_0_'] := FAliment.PBC12_0.Text;
|
174 |
FieldValues['_C12_Tot_'] := FAliment.PBC12_tot.Text;
|
175 |
FieldValues['_C14_0_'] := FAliment.PBC14_0.Text;
|
176 |
FieldValues['_C14_Tot_'] := FAliment.PBC14_tot.Text;
|
177 |
FieldValues['_C16_0_'] := FAliment.PBC16_0.Text;
|
178 |
FieldValues['_C16_1_'] := FAliment.PBC16_1.Text;
|
179 |
FieldValues['_C16_Tot_'] := FAliment.PBC16_tot.Text;
|
180 |
FieldValues['_C18_0_'] := FAliment.PBC18_0.Text;
|
181 |
FieldValues['_C18_1_'] := FAliment.PBC18_1.Text;
|
182 |
FieldValues['_C18_2_'] := FAliment.PBC18_2.Text;
|
183 |
FieldValues['_C18_3_'] := FAliment.PBC18_3.Text;
|
184 |
FieldValues['_C18_4_'] := FAliment.PBC18_4.Text;
|
185 |
FieldValues['_C18_Tot_'] := FAliment.PBC18_tot.Text;
|
186 |
FieldValues['_C20_0_'] := FAliment.PBC20_0.Text;
|
187 |
FieldValues['_C20_1_'] := FAliment.PBC20_1.Text;
|
188 |
FieldValues['_C20_4_'] := FAliment.PBC20_4.Text;
|
189 |
FieldValues['_C20_5_'] := FAliment.PBC20_5.Text;
|
190 |
FieldValues['_C20_Tot_'] := FAliment.PBC20_tot.Text;
|
191 |
FieldValues['_C22_0_'] := FAliment.PBC22_0.Text;
|
192 |
FieldValues['_C22_1_'] := FAliment.PBC22_1.Text;
|
193 |
FieldValues['_C22_5_'] := FAliment.PBC22_5.Text;
|
194 |
FieldValues['_C22_6_'] := FAliment.PBC22_6.Text;
|
195 |
FieldValues['_C22_Tot_'] := FAliment.PBC22_tot.Text;
|
196 |
FieldValues['_C24_0_'] := FAliment.PBC24_0.Text;
|
197 |
FieldValues['_C24_Tot_'] := FAliment.PBC24_tot.Text;
|
198 |
FieldValues['_CTot_0_'] := FAliment.PBCtot_0.Text;
|
199 |
FieldValues['_CTot_1_'] := FAliment.PBCtot_1.Text;
|
200 |
FieldValues['_CTot_2_'] := FAliment.PBCtot_2.Text;
|
201 |
FieldValues['_CTot_3_'] := FAliment.PBCtot_3.Text;
|
202 |
FieldValues['_CTot_4_'] := FAliment.PBCtot_4.Text;
|
203 |
FieldValues['_CTot_5_'] := FAliment.PBCtot_5.Text;
|
204 |
FieldValues['_CTot_6_'] := FAliment.PBCtot_6.Text;
|
205 |
FieldValues['_CTot_Tot_'] := FAliment.PBCtot_tot.Text;
|
206 |
FieldValues['_Lip_'] := FAliment.PBLip2.Text;
|
207 |
FieldValues['_AGsLip_'] := FAliment.PBAG.Text;
|
208 |
Post; |
209 |
end ;
|
210 |
QRMMemo.Lines.Add(FAliment.CBAliment.Hint); |
211 |
QRLCompo.Caption:= FAliment.Hint; |
212 |
QRLTAG.Caption:= FAliment.GBTAG.Caption; |
213 |
RegisterPreviewClass(TQRPrevRapInterface); |
214 |
// QRRapport.PreviewModal;
|
215 |
// RegisterPreviewClass(TQRStandardPreviewInterface);
|
216 |
end;
|
217 |
|
218 |
end.
|