root / UFRapBesGestT.pas
Historique | Voir | Annoter | Télécharger (10,354 ko)
1 |
unit UFRapBesGestT ;
|
---|---|
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 |
TFRapBesGestT = class(TForm)
|
12 |
QRRapport: TQuickRep; |
13 |
PHBRapport: TQRBand; |
14 |
DBRapport: TQRBand; |
15 |
QRLTitre: TQRLabel; |
16 |
CDSRapport: TClientDataSet; |
17 |
QRLSaillie: TQRLabel; |
18 |
QRLPoids: TQRLabel; |
19 |
QRLCaract: TQRLabel; |
20 |
QRLMiseBas: TQRLabel; |
21 |
QRLP2: TQRLabel; |
22 |
QRLAge: TQRLabel; |
23 |
QRLPortee: TQRLabel; |
24 |
QRLNesVifs: TQRLabel; |
25 |
QRLPdsPt: TQRLabel; |
26 |
QRLTyp: TQRLabel; |
27 |
FFPdsSail: TFloatField; |
28 |
FFPdsMB: TFloatField; |
29 |
FFP2Sail: TFloatField; |
30 |
FFP2MB: TFloatField; |
31 |
IFAgeSail: TIntegerField; |
32 |
IFAgeMB: TIntegerField; |
33 |
QRLVariation: TQRLabel; |
34 |
QRDBTPdsSail: TQRDBText; |
35 |
QRDBTPdsMB: TQRDBText; |
36 |
QREPds: TQRExpr; |
37 |
QRDBTP2Sail: TQRDBText; |
38 |
QRDBTP2MB: TQRDBText; |
39 |
QREP2: TQRExpr; |
40 |
QRDBTAgeSail: TQRDBText; |
41 |
QRDBTAgeMB: TQRDBText; |
42 |
QREAge: TQRExpr; |
43 |
IFPortee: TIntegerField; |
44 |
FFPdsPort: TFloatField; |
45 |
SFLoge: TStringField; |
46 |
QRDBText1: TQRDBText; |
47 |
QRDBText2: TQRDBText; |
48 |
QRDBText3: TQRDBText; |
49 |
QRDBText6: TQRDBText; |
50 |
QRLNRJ: TQRLabel; |
51 |
QRLAA: TQRLabel; |
52 |
QRLNRJEnt: TQRLabel; |
53 |
QRLNRJAct: TQRLabel; |
54 |
QRLNRJThe: TQRLabel; |
55 |
QRLNRJPort: TQRLabel; |
56 |
QRLNRJRes: TQRLabel; |
57 |
QRLNRJTot: TQRLabel; |
58 |
QRDBTEMEnt: TQRDBText; |
59 |
QRLEMEnt: TQRLabel; |
60 |
QRLPctEnt: TQRLabel; |
61 |
QRDBTEMThe: TQRDBText; |
62 |
QRLEMThe: TQRLabel; |
63 |
QRLPctThe: TQRLabel; |
64 |
QRDBTEMRes: TQRDBText; |
65 |
QRLEMRes: TQRLabel; |
66 |
QRLPctRes: TQRLabel; |
67 |
QRDBTEMAct: TQRDBText; |
68 |
QRLEMAct: TQRLabel; |
69 |
QRLPctAct: TQRLabel; |
70 |
QRDBTEMPort: TQRDBText; |
71 |
QRLEMPort: TQRLabel; |
72 |
QRLPctPort: TQRLabel; |
73 |
QRDBTEMTot: TQRDBText; |
74 |
QREPctEnt: TQRExpr; |
75 |
QREPctThe: TQRExpr; |
76 |
QREPctRes: TQRExpr; |
77 |
QREPctAct: TQRExpr; |
78 |
QREPctPort: TQRExpr; |
79 |
FFBesEMEnt: TFloatField; |
80 |
FFBesEMAct: TFloatField; |
81 |
FFBesEMThe: TFloatField; |
82 |
FFBesEMPort: TFloatField; |
83 |
FFBesEMRes: TFloatField; |
84 |
FFBesEMTot: TFloatField; |
85 |
FFAppED: TFloatField; |
86 |
FFAppEM: TFloatField; |
87 |
FFAppEN: TFloatField; |
88 |
FFBesAli: TFloatField; |
89 |
QRLEMTot: TQRLabel; |
90 |
QRLENTot: TQRLabel; |
91 |
QREENTot: TQRExpr; |
92 |
QRLAli: TQRLabel; |
93 |
QRDBTAli: TQRDBText; |
94 |
QRLAATot: TQRLabel; |
95 |
QRLAAAli: TQRLabel; |
96 |
QRLPctLys: TQRLabel; |
97 |
QRLAATot35: TQRLabel; |
98 |
QRLAATot105: TQRLabel; |
99 |
QRLAAAli35: TQRLabel; |
100 |
QRLAAAli105: TQRLabel; |
101 |
QRLLys: TQRLabel; |
102 |
QRLMet: TQRLabel; |
103 |
QRLMetCys: TQRLabel; |
104 |
QRLTrp: TQRLabel; |
105 |
QRLThr: TQRLabel; |
106 |
QRLPhe: TQRLabel; |
107 |
QRLPheTyr: TQRLabel; |
108 |
QRLLeu: TQRLabel; |
109 |
QRLIle: TQRLabel; |
110 |
QRLVal: TQRLabel; |
111 |
QRLHis: TQRLabel; |
112 |
QRLArg: TQRLabel; |
113 |
QRDBTLysTot35: TQRDBText; |
114 |
QRDBTMetTot35: TQRDBText; |
115 |
QRDBTMetCysTot35: TQRDBText; |
116 |
QRDBTTrpTot35: TQRDBText; |
117 |
QRDBTThrTot35: TQRDBText; |
118 |
QRDBTPheTot35: TQRDBText; |
119 |
QRDBTPheTyrTot35: TQRDBText; |
120 |
QRDBTLeuTot35: TQRDBText; |
121 |
QRDBTIleTot35: TQRDBText; |
122 |
QRDBTValTot305: TQRDBText; |
123 |
QRDBTHisTot35: TQRDBText; |
124 |
QRDBTArgTot35: TQRDBText; |
125 |
QRDBTLysTot105: TQRDBText; |
126 |
QRDBTMetTot105: TQRDBText; |
127 |
QRDBTMetCysTot105: TQRDBText; |
128 |
QRDBTTrpTot105: TQRDBText; |
129 |
QRDBTThrTot105: TQRDBText; |
130 |
QRDBTPheTot105: TQRDBText; |
131 |
QRDBTPheTyrTot105: TQRDBText; |
132 |
QRDBTLeuTot105: TQRDBText; |
133 |
QRDBTIleTot105: TQRDBText; |
134 |
QRDBTValTot105: TQRDBText; |
135 |
QRDBTHisTot105: TQRDBText; |
136 |
QRDBTArgTot105: TQRDBText; |
137 |
QRELysAli35: TQRExpr; |
138 |
QREMetAli35: TQRExpr; |
139 |
QREMetCysAli35: TQRExpr; |
140 |
QRETrpAli35: TQRExpr; |
141 |
QREThrAli35: TQRExpr; |
142 |
QREPheAli35: TQRExpr; |
143 |
QREPheTyrAli35: TQRExpr; |
144 |
QRELeuAli35: TQRExpr; |
145 |
QREIleAli35: TQRExpr; |
146 |
QREValAli35: TQRExpr; |
147 |
QREHisAli35: TQRExpr; |
148 |
QREArgAli35: TQRExpr; |
149 |
QRELysAli105: TQRExpr; |
150 |
QREMetAli105: TQRExpr; |
151 |
QREMetCysAli105: TQRExpr; |
152 |
QRETrpAli105: TQRExpr; |
153 |
QREThrAli105: TQRExpr; |
154 |
QREPheAli105: TQRExpr; |
155 |
QREPheTyrAli105: TQRExpr; |
156 |
QRELeuAli105: TQRExpr; |
157 |
QREIleAli105: TQRExpr; |
158 |
QREValAli105: TQRExpr; |
159 |
QREHisAli105: TQRExpr; |
160 |
QREArgAli105: TQRExpr; |
161 |
QRELysPctLys: TQRExpr; |
162 |
QREMetPctLys: TQRExpr; |
163 |
QREMetCysPctLys: TQRExpr; |
164 |
QRETrpPctLys: TQRExpr; |
165 |
QREThrPctLys: TQRExpr; |
166 |
QREPhePctLys: TQRExpr; |
167 |
QREPheTyrPctLys: TQRExpr; |
168 |
QRELeuPctLys: TQRExpr; |
169 |
QREIlePctLys: TQRExpr; |
170 |
QREValPctLys: TQRExpr; |
171 |
QREHisPctLys: TQRExpr; |
172 |
QREArgPctLys: TQRExpr; |
173 |
FFLys105: TFloatField; |
174 |
FFMet105: TFloatField; |
175 |
FFMetCys105: TFloatField; |
176 |
FFTrp105: TFloatField; |
177 |
FFThr105: TFloatField; |
178 |
FFPhe105: TFloatField; |
179 |
FFPheTyr105: TFloatField; |
180 |
FFLeu105: TFloatField; |
181 |
FFIle105: TFloatField; |
182 |
FFVal105: TFloatField; |
183 |
FFHis105: TFloatField; |
184 |
FFArg105: TFloatField; |
185 |
FFLys35: TFloatField; |
186 |
FFMet35: TFloatField; |
187 |
FFMetCys35: TFloatField; |
188 |
FFTrp35: TFloatField; |
189 |
FFThr35: TFloatField; |
190 |
FFPhe35: TFloatField; |
191 |
FFPheTyr35: TFloatField; |
192 |
FFLeu35: TFloatField; |
193 |
FFIle35: TFloatField; |
194 |
FFVal35: TFloatField; |
195 |
FFHis35: TFloatField; |
196 |
FFArg35: TFloatField; |
197 |
QRShape1: TQRShape; |
198 |
QRShape2: TQRShape; |
199 |
QRShape3: TQRShape; |
200 |
QRLMinAli: TQRLabel; |
201 |
QRLMinTot: TQRLabel; |
202 |
QRShape4: TQRShape; |
203 |
QRShape5: TQRShape; |
204 |
QRLMin: TQRLabel; |
205 |
QRLMinTot35: TQRLabel; |
206 |
QRLMinTot105: TQRLabel; |
207 |
QRLMinAli35: TQRLabel; |
208 |
QRLMinAli105: TQRLabel; |
209 |
QREPAli105: TQRExpr; |
210 |
QREPAli35: TQRExpr; |
211 |
QRLabel9: TQRLabel; |
212 |
QRDBTP35Tot: TQRDBText; |
213 |
QRDBTP105Tot: TQRDBText; |
214 |
QRECaAli105: TQRExpr; |
215 |
QRECaAli35: TQRExpr; |
216 |
QRLabel10: TQRLabel; |
217 |
QRDBTCa35Tot: TQRDBText; |
218 |
QRDBTCa105Tot: TQRDBText; |
219 |
FFP35: TFloatField; |
220 |
FFCa35: TFloatField; |
221 |
FFP105: TFloatField; |
222 |
FFCa105: TFloatField; |
223 |
FFNesTotaux: TFloatField; |
224 |
PFBRapport: TQRBand; |
225 |
QRLUser: TQRLabel; |
226 |
QRLWarning: TQRLabel; |
227 |
QRSDDate: TQRSysData; |
228 |
QRIInraPorc: TQRImage; |
229 |
QRLInraPorc: TQRLabel; |
230 |
procedure FormCreate(Sender: TObject);
|
231 |
private
|
232 |
{ D?clarations priv?es }
|
233 |
public
|
234 |
{ D?clarations publiques }
|
235 |
end;
|
236 |
|
237 |
var
|
238 |
FRapBesGestT: TFRapBesGestT; |
239 |
|
240 |
implementation
|
241 |
|
242 |
uses
|
243 |
UStrings, UUtil, UFBesGestT, UFPrevRap ; |
244 |
|
245 |
{$R *.dfm}
|
246 |
|
247 |
{ TFRapBesGestT }
|
248 |
|
249 |
procedure TFRapBesGestT.FormCreate(Sender: TObject);
|
250 |
begin
|
251 |
if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
252 |
then
|
253 |
Font.Name := 'Arial Unicode MS';
|
254 |
TranslateComponent(Self); |
255 |
// Licence
|
256 |
if IsEducation and (Length (Course) > 0) |
257 |
then
|
258 |
QRLUSer.Caption := Format('%s (%s)', [Course, Company])
|
259 |
else
|
260 |
if IsComplete or IsEducation |
261 |
then
|
262 |
QRLUSer.Caption := Format('%s %s (%s)', [FirstName, LastName, Company])
|
263 |
else
|
264 |
if IsEvaluation
|
265 |
then
|
266 |
QRLUSer.Caption := StrEvaluation |
267 |
else
|
268 |
begin
|
269 |
QRLUSer.Caption := StrReadOnly; |
270 |
QRLUser.Font.Color := clRed; |
271 |
end;
|
272 |
with CDSRapport do |
273 |
begin
|
274 |
CreateDataSet; |
275 |
Append; |
276 |
FieldValues['_Portee_'] := FBesGestT.PBPortee.AsInteger ;
|
277 |
FieldValues['_NesTotaux_'] := FBesGestT.PBNesTotaux.AsFloat ;
|
278 |
FieldValues['_PdsPort_'] := FBesGestT.PBPdsNais.AsFloat * FBesGestT.PBNesTotaux.AsFloat ;
|
279 |
FieldValues['_PdsSail_'] := FBesGestT.PBPdsSail.AsFloat ;
|
280 |
FieldValues['_PdsMB_'] := FBesGestT.PBPdsApMB.AsFloat ;
|
281 |
FieldValues['_P2Sail_'] := FBesGestT.PBP2Sail.AsFloat ;
|
282 |
FieldValues['_P2MB_'] := FBesGestT.PBP2MB.AsFloat ;
|
283 |
FieldValues['_AgeSail_'] := FBesGestT.PBAgeSail.AsInteger ;
|
284 |
FieldValues['_AgeMB_'] := FBesGestT.PBAgeSail.AsInteger + DureeGest ;
|
285 |
if FBesGestT.CBLoge.ItemIndex = 0 |
286 |
then
|
287 |
FieldValues['_Loge_'] := Format ('%s - %s - %d %s - %d %s', [FBesGestT.CBTyp.Text, FBesGestT.CBSol.Text, FBesGestT.PBTemp.AsInteger, StrDegC, FBesGestT.PBAct.AsInteger, StrMnDebout]) |
288 |
else
|
289 |
FieldValues['_Loge_'] := FBesGestT.CBLoge.Text ;
|
290 |
FieldValues['_BesEMEnt_'] := FBesGestT.BesEMEntTot ;
|
291 |
FieldValues['_BesEMAct_'] := FBesGestT.BesEMActTot ;
|
292 |
FieldValues['_BesEMThe_'] := FBesGestT.BesEMTheTot ;
|
293 |
FieldValues['_BesEMPort_'] := FBesGestT.BesEMPortTot ;
|
294 |
FieldValues['_BesEMRes_'] := FBesGestT.BesEMResTot ;
|
295 |
FieldValues['_BesEMTot_'] := FBesGestT.BesEMTot ;
|
296 |
FieldValues['_AppED_'] := FBesGestT.AppEDTot ;
|
297 |
FieldValues['_AppEM_'] := FBesGestT.AppEMTot ;
|
298 |
FieldValues['_AppEN_'] := FBesGestT.AppENTot ;
|
299 |
if (FBesGestT.AppEMTot = 0) |
300 |
then
|
301 |
FieldValues['_BesAli_'] := 0 |
302 |
else
|
303 |
FieldValues['_BesAli_'] := FBesGestT.BesEMTot * FBesGestT.AppAliTot / FBesGestT.AppEMTot ;
|
304 |
FieldValues['_Lys35_'] := FBesGestT.BesAA[1, 35] ; |
305 |
FieldValues['_Met35_'] := FBesGestT.BesAA[2, 35] ; |
306 |
FieldValues['_MetCys35_'] := FBesGestT.BesAA[13, 35] ; |
307 |
FieldValues['_Trp35_'] := FBesGestT.BesAA[4, 35] ; |
308 |
FieldValues['_Thr35_'] := FBesGestT.BesAA[5, 35] ; |
309 |
FieldValues['_Phe35_'] := FBesGestT.BesAA[6, 35] ; |
310 |
FieldValues['_PheTyr35_'] := FBesGestT.BesAA[14, 35] ; |
311 |
FieldValues['_Leu35_'] := FBesGestT.BesAA[8, 35] ; |
312 |
FieldValues['_Ile35_'] := FBesGestT.BesAA[9, 35] ; |
313 |
FieldValues['_Val35_'] := FBesGestT.BesAA[10, 35] ; |
314 |
FieldValues['_His35_'] := FBesGestT.BesAA[11, 35] ; |
315 |
FieldValues['_Arg35_'] := FBesGestT.BesAA[12, 35] ; |
316 |
FieldValues['_Lys105_'] := FBesGestT.BesAA[1, 105] ; |
317 |
FieldValues['_Met105_'] := FBesGestT.BesAA[2, 105] ; |
318 |
FieldValues['_MetCys105_'] := FBesGestT.BesAA[13, 105] ; |
319 |
FieldValues['_Trp105_'] := FBesGestT.BesAA[4, 105] ; |
320 |
FieldValues['_Thr105_'] := FBesGestT.BesAA[5, 105] ; |
321 |
FieldValues['_Phe105_'] := FBesGestT.BesAA[6, 105] ; |
322 |
FieldValues['_PheTyr105_'] := FBesGestT.BesAA[14, 105] ; |
323 |
FieldValues['_Leu105_'] := FBesGestT.BesAA[8, 105] ; |
324 |
FieldValues['_Ile105_'] := FBesGestT.BesAA[9, 105] ; |
325 |
FieldValues['_Val105_'] := FBesGestT.BesAA[10, 105] ; |
326 |
FieldValues['_His105_'] := FBesGestT.BesAA[11, 105] ; |
327 |
FieldValues['_Arg105_'] := FBesGestT.BesAA[12, 105] ; |
328 |
FieldValues['_P35_'] := FBesGestT.BesP[35] ; |
329 |
FieldValues['_Ca35_'] := FBesGestT.BesCa[35] ; |
330 |
FieldValues['_P105_'] := FBesGestT.BesP[105] ; |
331 |
FieldValues['_Ca105_'] := FBesGestT.BesCa[105] ; |
332 |
Post; |
333 |
end ;
|
334 |
RegisterPreviewClass(TQRPrevRapInterface); |
335 |
// QRRapport.PreviewModal;
|
336 |
// RegisterPreviewClass(TQRStandardPreviewInterface);
|
337 |
end;
|
338 |
|
339 |
end.
|