root / UFRapAliMin.pas
Historique | Voir | Annoter | Télécharger (4,821 ko)
1 | 3 | avalancogn | unit UFRapAliMin ;
|
---|---|---|---|
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 | TFRapAliMin = 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 | QRLTMacro: TQRLabel; |
||
28 | QRLCa: TQRLabel; |
||
29 | QRDBTCa: TQRDBText; |
||
30 | QRLMacro: TQRLabel; |
||
31 | QRLCompo: TQRLabel; |
||
32 | QRLNa: TQRLabel; |
||
33 | QRDBTNa: TQRDBText; |
||
34 | QRLMg: TQRLabel; |
||
35 | QRDBTMg: TQRDBText; |
||
36 | QRLS: TQRLabel; |
||
37 | QRDBTS: TQRDBText; |
||
38 | QRLP: TQRLabel; |
||
39 | QRDBTP: TQRDBText; |
||
40 | QRLK: TQRLabel; |
||
41 | QRDBTK: TQRDBText; |
||
42 | QRLCl: TQRLabel; |
||
43 | QRDBTCl: TQRDBText; |
||
44 | QRLTOligo: TQRLabel; |
||
45 | QRLCu: TQRLabel; |
||
46 | QRDBTCu: TQRDBText; |
||
47 | QRLOligo: TQRLabel; |
||
48 | QRLMn: TQRLabel; |
||
49 | QRDBTMn: TQRDBText; |
||
50 | QRLSe: TQRLabel; |
||
51 | QRDBTSe: TQRDBText; |
||
52 | QRLMb: TQRLabel; |
||
53 | QRDBTMb: TQRDBText; |
||
54 | QRLZn: TQRLabel; |
||
55 | QRDBTZn: TQRDBText; |
||
56 | QRLFe: TQRLabel; |
||
57 | QRDBTFe: TQRDBText; |
||
58 | QRLCo: TQRLabel; |
||
59 | QRDBTCo: TQRDBText; |
||
60 | QRLI: TQRLabel; |
||
61 | QRDBTI: TQRDBText; |
||
62 | QRLPhosphore: TQRLabel; |
||
63 | QRLPTot: TQRLabel; |
||
64 | QRDBTPTot: TQRDBText; |
||
65 | QRLPDigG: TQRLabel; |
||
66 | QRDBTPDigG: TQRDBText; |
||
67 | QRLPhytase: TQRLabel; |
||
68 | QRDBTPhytase: TQRDBText; |
||
69 | QRLActPhytE: TQRLabel; |
||
70 | QRDBTActPhytE: TQRDBText; |
||
71 | QRLPDig: TQRLabel; |
||
72 | QRLPDigF: TQRLabel; |
||
73 | QRDBTPDigF: TQRDBText; |
||
74 | QRLActPhyt: TQRLabel; |
||
75 | QRLActPhytM: TQRLabel; |
||
76 | QRDBTActPhytM: TQRDBText; |
||
77 | SFP: TStringField; |
||
78 | SFNa: TStringField; |
||
79 | SFK: TStringField; |
||
80 | SFMg: TStringField; |
||
81 | SFCl: TStringField; |
||
82 | SFS: TStringField; |
||
83 | SFCa: TStringField; |
||
84 | SFZn: TStringField; |
||
85 | SFPDigF: TStringField; |
||
86 | SFMn: TStringField; |
||
87 | SFFe: TStringField; |
||
88 | SFSe: TStringField; |
||
89 | SFCo: TStringField; |
||
90 | SFMb: TStringField; |
||
91 | SFI: TStringField; |
||
92 | SFCu: TStringField; |
||
93 | SFPhytase: TStringField; |
||
94 | SFPDigG: TStringField; |
||
95 | SFActPhytM: TStringField; |
||
96 | SFPTot: TStringField; |
||
97 | SFActPhytE: TStringField; |
||
98 | QRIInraPorc: TQRImage; |
||
99 | QRLInraPorc: TQRLabel; |
||
100 | procedure FormCreate(Sender: TObject);
|
||
101 | private
|
||
102 | { D?clarations priv?es }
|
||
103 | public
|
||
104 | { D?clarations publiques }
|
||
105 | end;
|
||
106 | |||
107 | var
|
||
108 | FRapAliMin: TFRapAliMin; |
||
109 | |||
110 | implementation
|
||
111 | |||
112 | uses
|
||
113 | UStrings, UCalcul, UUtil, UFAliment, UFPrevRap ; |
||
114 | |||
115 | {$R *.dfm}
|
||
116 | |||
117 | { TFRapAliMin }
|
||
118 | |||
119 | procedure TFRapAliMin.FormCreate(Sender: TObject);
|
||
120 | begin
|
||
121 | if Screen.Fonts.IndexOf('Arial Unicode MS') <> -1 |
||
122 | then
|
||
123 | Font.Name := 'Arial Unicode MS';
|
||
124 | TranslateComponent(Self); |
||
125 | // Licence
|
||
126 | if IsEducation and (Length (Course) > 0) |
||
127 | then
|
||
128 | QRLUSer.Caption := Format('%s (%s)', [Course, Company])
|
||
129 | else
|
||
130 | if IsComplete or IsEducation |
||
131 | then
|
||
132 | QRLUSer.Caption := Format('%s %s (%s)', [FirstName, LastName, Company])
|
||
133 | else
|
||
134 | if IsEvaluation
|
||
135 | then
|
||
136 | QRLUSer.Caption := StrEvaluation |
||
137 | else
|
||
138 | begin
|
||
139 | QRLUSer.Caption := StrReadOnly; |
||
140 | QRLUser.Font.Color := clRed; |
||
141 | end;
|
||
142 | with CDSRapport do |
||
143 | begin
|
||
144 | CreateDataSet; |
||
145 | Append; |
||
146 | FieldValues['_Aliment_'] := FAliment.CBAliment.Text;
|
||
147 | FieldValues['_Ca_'] := FAliment.PBCa.Text;
|
||
148 | FieldValues['_P_'] := FAliment.PBP.Text;
|
||
149 | FieldValues['_Na_'] := FAliment.PBNa.Text;
|
||
150 | FieldValues['_K_'] := FAliment.PBK.Text;
|
||
151 | FieldValues['_Mg_'] := FAliment.PBMg.Text;
|
||
152 | FieldValues['_Cl_'] := FAliment.PBCl.Text;
|
||
153 | FieldValues['_S_'] := FAliment.PBS.Text;
|
||
154 | FieldValues['_Cu_'] := FAliment.PBCu.Text;
|
||
155 | FieldValues['_Zn_'] := FAliment.PBZn.Text;
|
||
156 | FieldValues['_Mn_'] := FAliment.PBMn.Text;
|
||
157 | FieldValues['_Fe_'] := FAliment.PBFe.Text;
|
||
158 | FieldValues['_Se_'] := FAliment.PBSe.Text;
|
||
159 | FieldValues['_Co_'] := FAliment.PBCo.Text;
|
||
160 | FieldValues['_Mb_'] := FAliment.PBMb.Text;
|
||
161 | FieldValues['_I_'] := FAliment.PBI.Text;
|
||
162 | FieldValues['_PTot_'] := FAliment.PBPtot.Text;
|
||
163 | FieldValues['_PDigG_'] := FAliment.PBPdigG.Text;
|
||
164 | FieldValues['_PDigF_'] := FAliment.PBPdigF.Text;
|
||
165 | FieldValues['_Phytase_'] := FAliment.PBPhytase.Text;
|
||
166 | FieldValues['_ActPhytE_'] := FAliment.PBActPhytE.Text;
|
||
167 | FieldValues['_ActPhytM_'] := FAliment.PBActPhytM.Text;
|
||
168 | Post; |
||
169 | end ;
|
||
170 | QRMMemo.Lines.Add(FAliment.CBAliment.Hint); |
||
171 | QRLCompo.Caption:= FAliment.Hint; |
||
172 | QRLTMacro.Caption:= FAliment.GBTMacro.Caption; |
||
173 | QRLTOligo.Caption:= FAliment.GBTOligo.Caption; |
||
174 | RegisterPreviewClass(TQRPrevRapInterface); |
||
175 | // QRRapport.PreviewModal;
|
||
176 | // RegisterPreviewClass(TQRStandardPreviewInterface);
|
||
177 | end;
|
||
178 | |||
179 | end. |