root / UFRapMatMin.pas
Historique | Voir | Annoter | Télécharger (4,821 ko)
1 |
unit UFRapMatMin;
|
---|---|
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 |
TFRapMatMin = class(TForm)
|
12 |
QRRapport: TQuickRep; |
13 |
PHBRapport: TQRBand; |
14 |
DBRapport: TQRBand; |
15 |
QRLTitre: TQRLabel; |
16 |
QRLMatiere: 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 |
SFMatiere: TStringField; |
26 |
QRDBMatiere: 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 |
FRapMatMin: TFRapMatMin; |
109 |
|
110 |
implementation
|
111 |
|
112 |
uses
|
113 |
UStrings, UCalcul, UUtil, UFMatiere, UFPrevRap; |
114 |
|
115 |
{$R *.dfm}
|
116 |
|
117 |
{ TFRapMatMin }
|
118 |
|
119 |
procedure TFRapMatMin.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['_Matiere_'] := FMatiere.CBMatiere.Text;
|
147 |
FieldValues['_Ca_'] := FMatiere.PBCa.Text;
|
148 |
FieldValues['_P_'] := FMatiere.PBP.Text;
|
149 |
FieldValues['_Na_'] := FMatiere.PBNa.Text;
|
150 |
FieldValues['_K_'] := FMatiere.PBK.Text;
|
151 |
FieldValues['_Mg_'] := FMatiere.PBMg.Text;
|
152 |
FieldValues['_Cl_'] := FMatiere.PBCl.Text;
|
153 |
FieldValues['_S_'] := FMatiere.PBS.Text;
|
154 |
FieldValues['_Cu_'] := FMatiere.PBCu.Text;
|
155 |
FieldValues['_Zn_'] := FMatiere.PBZn.Text;
|
156 |
FieldValues['_Mn_'] := FMatiere.PBMn.Text;
|
157 |
FieldValues['_Fe_'] := FMatiere.PBFe.Text;
|
158 |
FieldValues['_Se_'] := FMatiere.PBSe.Text;
|
159 |
FieldValues['_Co_'] := FMatiere.PBCo.Text;
|
160 |
FieldValues['_Mb_'] := FMatiere.PBMb.Text;
|
161 |
FieldValues['_I_'] := FMatiere.PBI.Text;
|
162 |
FieldValues['_PTot_'] := FMatiere.PBPtot.Text;
|
163 |
FieldValues['_PDigG_'] := FMatiere.PBPdigG.Text;
|
164 |
FieldValues['_PDigF_'] := FMatiere.PBPdigF.Text;
|
165 |
FieldValues['_Phytase_'] := FMatiere.PBPhytase.Text;
|
166 |
FieldValues['_ActPhytE_'] := FMatiere.PBActPhytE.Text;
|
167 |
FieldValues['_ActPhytM_'] := FMatiere.PBActPhytM.Text;
|
168 |
Post; |
169 |
end;
|
170 |
QRMMemo.Lines.Add(FMatiere.CBMatiere.Hint); |
171 |
QRLCompo.Caption := FMatiere.Hint; |
172 |
QRLTMacro.Caption := FMatiere.GBTMacro.Caption; |
173 |
QRLTOligo.Caption := FMatiere.GBTOligo.Caption; |
174 |
RegisterPreviewClass(TQRPrevRapInterface); |
175 |
// QRRapport.PreviewModal;
|
176 |
// RegisterPreviewClass(TQRStandardPreviewInterface);
|
177 |
end;
|
178 |
|
179 |
end.
|