root / UFRapAliAA.pas
Historique | Voir | Annoter | Télécharger (7,663 ko)
1 | 3 | avalancogn | unit UFRapAliAA ;
|
---|---|---|---|
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 | TFRapAliAA = 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 | QRLTAA: TQRLabel; |
||
28 | QRLMAT: TQRLabel; |
||
29 | QRDBTTMAT: TQRDBText; |
||
30 | QRLAA: TQRLabel; |
||
31 | QRLdAA: TQRLabel; |
||
32 | QRSdFecale: TQRShape; |
||
33 | QRLdAA_Std: TQRLabel; |
||
34 | QRLdAA_App: TQRLabel; |
||
35 | QRLCompo: TQRLabel; |
||
36 | QRDBTdMAT_Std: TQRDBText; |
||
37 | QRDBTdMAT_App: TQRDBText; |
||
38 | SFLys: TStringField; |
||
39 | SFdLysStd: TStringField; |
||
40 | SFdLysApp: TStringField; |
||
41 | SFTMet: TStringField; |
||
42 | SFdMetStd: TStringField; |
||
43 | SFdMetApp: TStringField; |
||
44 | SFTCys: TStringField; |
||
45 | SFdCysStd: TStringField; |
||
46 | SFdCysApp: TStringField; |
||
47 | SFTTrp: TStringField; |
||
48 | SFdTrpStd: TStringField; |
||
49 | SFdTrpApp: TStringField; |
||
50 | SFTThr: TStringField; |
||
51 | SFdThrStd: TStringField; |
||
52 | SFdThrApp: TStringField; |
||
53 | SFTPhe: TStringField; |
||
54 | SFdPheStd: TStringField; |
||
55 | SFdPheApp: TStringField; |
||
56 | SFTTyr: TStringField; |
||
57 | SFdTyrStd_: TStringField; |
||
58 | SFdTyrApp: TStringField; |
||
59 | SFTLeu: TStringField; |
||
60 | SFdLeuStd: TStringField; |
||
61 | SFdLeuApp: TStringField; |
||
62 | SFTIle: TStringField; |
||
63 | SFdIleStd: TStringField; |
||
64 | SFdIleApp: TStringField; |
||
65 | SFTVal: TStringField; |
||
66 | SFdValStd: TStringField; |
||
67 | SFdValApp: TStringField; |
||
68 | SFTHis: TStringField; |
||
69 | SFdHisStd: TStringField; |
||
70 | SFdHisApp: TStringField; |
||
71 | SFTArg: TStringField; |
||
72 | SFdArgStd: TStringField; |
||
73 | SFdArgApp: TStringField; |
||
74 | SFTMetCys: TStringField; |
||
75 | SFdMetCysStd: TStringField; |
||
76 | SFdMetCysApp: TStringField; |
||
77 | SFTPheTyr: TStringField; |
||
78 | SFdPheTyrStd: TStringField; |
||
79 | SFdPheTyrApp: TStringField; |
||
80 | SFTMAT: TStringField; |
||
81 | SFdMATStd: TStringField; |
||
82 | SFdMATApp: TStringField; |
||
83 | QRLMet: TQRLabel; |
||
84 | QRDBTTMet: TQRDBText; |
||
85 | QRDBTdMetStd: TQRDBText; |
||
86 | QRDBTdMetApp: TQRDBText; |
||
87 | QRLTrp: TQRLabel; |
||
88 | QRDBTTTrp: TQRDBText; |
||
89 | QRDBTdTrpStd: TQRDBText; |
||
90 | QRDBTdTrpApp: TQRDBText; |
||
91 | QRLPhe: TQRLabel; |
||
92 | QRDBTTPhe: TQRDBText; |
||
93 | QRDBTdPheStd: TQRDBText; |
||
94 | QRDBTdPheApp: TQRDBText; |
||
95 | QRLLeu: TQRLabel; |
||
96 | QRDBTTLeu: TQRDBText; |
||
97 | QRDBTdLeuStd: TQRDBText; |
||
98 | QRDBTdLeuApp: TQRDBText; |
||
99 | QRLVal: TQRLabel; |
||
100 | QRDBTTVal: TQRDBText; |
||
101 | QRDBTdValStd: TQRDBText; |
||
102 | QRDBTdValApp: TQRDBText; |
||
103 | QRLArg: TQRLabel; |
||
104 | QRDBTTArg: TQRDBText; |
||
105 | QRDBTdArgStd: TQRDBText; |
||
106 | QRDBTdArgApp: TQRDBText; |
||
107 | QRLPheTyr: TQRLabel; |
||
108 | QRDBTTPheTyr: TQRDBText; |
||
109 | QRDBTdPheTyrStd: TQRDBText; |
||
110 | QRDBTdPheTyrApp: TQRDBText; |
||
111 | QRLLys: TQRLabel; |
||
112 | QRDBTTLys: TQRDBText; |
||
113 | QRDBTdLysStd: TQRDBText; |
||
114 | QRDBTdLysApp: TQRDBText; |
||
115 | QRLCys: TQRLabel; |
||
116 | QRDBTTCys: TQRDBText; |
||
117 | QRDBTdCysStd: TQRDBText; |
||
118 | QRDBTdCysApp: TQRDBText; |
||
119 | QRLThr: TQRLabel; |
||
120 | QRDBTTThr: TQRDBText; |
||
121 | QRDBTdThrStd: TQRDBText; |
||
122 | QRDBTdThrApp: TQRDBText; |
||
123 | QRLTyr: TQRLabel; |
||
124 | QRDBTTTyr: TQRDBText; |
||
125 | QRDBTdTyrStd: TQRDBText; |
||
126 | QRDBTdTyrApp: TQRDBText; |
||
127 | QRLIle: TQRLabel; |
||
128 | QRDBTTIle: TQRDBText; |
||
129 | QRDBTdIleStd: TQRDBText; |
||
130 | QRDBTdIleApp: TQRDBText; |
||
131 | QRLHis: TQRLabel; |
||
132 | QRDBTTHis: TQRDBText; |
||
133 | QRDBTdHisStd: TQRDBText; |
||
134 | QRDBTdHisApp: TQRDBText; |
||
135 | QRLMetCys: TQRLabel; |
||
136 | QRDBTTMetCys: TQRDBText; |
||
137 | QRDBTdMetCysStd: TQRDBText; |
||
138 | QRDBTdMetCysApp: TQRDBText; |
||
139 | QRIInraPorc: TQRImage; |
||
140 | QRLInraPorc: TQRLabel; |
||
141 | procedure FormCreate(Sender: TObject);
|
||
142 | private
|
||
143 | { D?clarations priv?es }
|
||
144 | public
|
||
145 | { D?clarations publiques }
|
||
146 | end;
|
||
147 | |||
148 | var
|
||
149 | FRapAliAA: TFRapAliAA; |
||
150 | |||
151 | implementation
|
||
152 | |||
153 | uses
|
||
154 | UStrings, UCalcul, UUtil, UFAliment, UFPrevRap ; |
||
155 | |||
156 | {$R *.dfm}
|
||
157 | |||
158 | { TFRapAliAA }
|
||
159 | |||
160 | procedure TFRapAliAA.FormCreate(Sender: TObject);
|
||
161 | begin
|
||
162 | if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
||
163 | then
|
||
164 | Font.Name := 'Arial Unicode MS';
|
||
165 | TranslateComponent(Self); |
||
166 | // Licence
|
||
167 | if IsEducation and (Length (Course) > 0) |
||
168 | then
|
||
169 | QRLUSer.Caption := Format('%s (%s)', [Course, Company])
|
||
170 | else
|
||
171 | if IsComplete or IsEducation |
||
172 | then
|
||
173 | QRLUSer.Caption := Format('%s %s (%s)', [FirstName, LastName, Company])
|
||
174 | else
|
||
175 | if IsEvaluation
|
||
176 | then
|
||
177 | QRLUSer.Caption := StrEvaluation |
||
178 | else
|
||
179 | begin
|
||
180 | QRLUSer.Caption := StrReadOnly; |
||
181 | QRLUser.Font.Color := clRed; |
||
182 | end;
|
||
183 | with CDSRapport do |
||
184 | begin
|
||
185 | CreateDataSet; |
||
186 | Append; |
||
187 | FieldValues['_Aliment_'] := FAliment.CBAliment.Text;
|
||
188 | FieldValues['_TMAT_'] := FAliment.PBTMAT2.Text;
|
||
189 | FieldValues['_dMAT_Std_'] := FAliment.PBdMATStd.Text;
|
||
190 | FieldValues['_dMAT_App_'] := FAliment.PBdMATApp.Text;
|
||
191 | FieldValues['_TLys_'] := FAliment.PBTLys.Text;
|
||
192 | FieldValues['_dLys_Std_'] := FAliment.PBdLysStd.Text;
|
||
193 | FieldValues['_dLys_App_'] := FAliment.PBdLysApp.Text;
|
||
194 | FieldValues['_TMet_'] := FAliment.PBTMet.Text;
|
||
195 | FieldValues['_dMet_Std_'] := FAliment.PBdMetStd.Text;
|
||
196 | FieldValues['_dMet_App_'] := FAliment.PBdMetApp.Text;
|
||
197 | FieldValues['_TCys_'] := FAliment.PBTCys.Text;
|
||
198 | FieldValues['_dCys_Std_'] := FAliment.PBdCysStd.Text;
|
||
199 | FieldValues['_dCys_App_'] := FAliment.PBdCysApp.Text;
|
||
200 | FieldValues['_TTrp_'] := FAliment.PBTTrp.Text;
|
||
201 | FieldValues['_dTrp_Std_'] := FAliment.PBdTrpStd.Text;
|
||
202 | FieldValues['_dTrp_App_'] := FAliment.PBdTrpApp.Text;
|
||
203 | FieldValues['_TThr_'] := FAliment.PBTThr.Text;
|
||
204 | FieldValues['_dThr_Std_'] := FAliment.PBdThrStd.Text;
|
||
205 | FieldValues['_dThr_App_'] := FAliment.PBdThrApp.Text;
|
||
206 | FieldValues['_TPhe_'] := FAliment.PBTPhe.Text;
|
||
207 | FieldValues['_dPhe_Std_'] := FAliment.PBdPheStd.Text;
|
||
208 | FieldValues['_dPhe_App_'] := FAliment.PBdPheApp.Text;
|
||
209 | FieldValues['_TTyr_'] := FAliment.PBTTyr.Text;
|
||
210 | FieldValues['_dTyr_Std_'] := FAliment.PBdTyrStd.Text;
|
||
211 | FieldValues['_dTyr_App_'] := FAliment.PBdTyrApp.Text;
|
||
212 | FieldValues['_TLeu_'] := FAliment.PBTLeu.Text;
|
||
213 | FieldValues['_dLeu_Std_'] := FAliment.PBdLeuStd.Text;
|
||
214 | FieldValues['_dLeu_App_'] := FAliment.PBdLeuApp.Text;
|
||
215 | FieldValues['_TIle_'] := FAliment.PBTIle.Text;
|
||
216 | FieldValues['_dIle_Std_'] := FAliment.PBdIleStd.Text;
|
||
217 | FieldValues['_dIle_App_'] := FAliment.PBdIleApp.Text;
|
||
218 | FieldValues['_TVal_'] := FAliment.PBTVal.Text;
|
||
219 | FieldValues['_dVal_Std_'] := FAliment.PBdValStd.Text;
|
||
220 | FieldValues['_dVal_App_'] := FAliment.PBdValApp.Text;
|
||
221 | FieldValues['_THis_'] := FAliment.PBTHis.Text;
|
||
222 | FieldValues['_dHis_Std_'] := FAliment.PBdHisStd.Text;
|
||
223 | FieldValues['_dHis_App_'] := FAliment.PBdHisApp.Text;
|
||
224 | FieldValues['_TArg_'] := FAliment.PBTArg.Text;
|
||
225 | FieldValues['_dArg_Std_'] := FAliment.PBdArgStd.Text;
|
||
226 | FieldValues['_dArg_App_'] := FAliment.PBdArgApp.Text;
|
||
227 | FieldValues['_TMetCys_'] := FAliment.PBTMetCys.Text;
|
||
228 | FieldValues['_dMetCys_Std_'] := FAliment.PBdMetCysStd.Text;
|
||
229 | FieldValues['_dMetCys_App_'] := FAliment.PBdMetCysApp.Text;
|
||
230 | FieldValues['_TPheTyr_'] := FAliment.PBTPheTyr.Text;
|
||
231 | FieldValues['_dPheTyr_Std_'] := FAliment.PBdPheTyrStd.Text;
|
||
232 | FieldValues['_dPheTyr_App_'] := FAliment.PBdPheTyrApp.Text;
|
||
233 | Post; |
||
234 | end ;
|
||
235 | QRMMemo.Lines.Add(FAliment.CBAliment.Hint); |
||
236 | QRLCompo.Caption:= FAliment.Hint; |
||
237 | QRLTAA.Caption:= FAliment.GBTAA.Caption; |
||
238 | QRLdAA.Caption:= FAliment.GBdAA.Caption; |
||
239 | RegisterPreviewClass(TQRPrevRapInterface); |
||
240 | // QRRapport.PreviewModal;
|
||
241 | // RegisterPreviewClass(TQRStandardPreviewInterface);
|
||
242 | end;
|
||
243 | |||
244 | end. |