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