Statistiques
| Révision:

root / UFRapMatAA.pas @ 3

Historique | Voir | Annoter | Télécharger (7,664 ko)

1
unit UFRapMatAA;
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
  TFRapMatAA = 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
    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
  FRapMatAA: TFRapMatAA;
150

    
151
implementation
152

    
153
uses
154
  UStrings, UCalcul, UUtil, UFMatiere, UFPrevRap;
155

    
156
{$R *.dfm}
157

    
158
{ TFRapMatAA }
159

    
160
procedure TFRapMatAA.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['_Matiere_'] := FMatiere.CBMatiere.Text;
188
    FieldValues['_TMAT_'] := FMatiere.PBTMAT2.Text;
189
    FieldValues['_dMAT_Std_'] := FMatiere.PBdMATStd.Text;
190
    FieldValues['_dMAT_App_'] := FMatiere.PBdMATApp.Text;
191
    FieldValues['_TLys_'] := FMatiere.PBTLys.Text;
192
    FieldValues['_dLys_Std_'] := FMatiere.PBdLysStd.Text;
193
    FieldValues['_dLys_App_'] := FMatiere.PBdLysApp.Text;
194
    FieldValues['_TMet_'] := FMatiere.PBTMet.Text;
195
    FieldValues['_dMet_Std_'] := FMatiere.PBdMetStd.Text;
196
    FieldValues['_dMet_App_'] := FMatiere.PBdMetApp.Text;
197
    FieldValues['_TCys_'] := FMatiere.PBTCys.Text;
198
    FieldValues['_dCys_Std_'] := FMatiere.PBdCysStd.Text;
199
    FieldValues['_dCys_App_'] := FMatiere.PBdCysApp.Text;
200
    FieldValues['_TTrp_'] := FMatiere.PBTTrp.Text;
201
    FieldValues['_dTrp_Std_'] := FMatiere.PBdTrpStd.Text;
202
    FieldValues['_dTrp_App_'] := FMatiere.PBdTrpApp.Text;
203
    FieldValues['_TThr_'] := FMatiere.PBTThr.Text;
204
    FieldValues['_dThr_Std_'] := FMatiere.PBdThrStd.Text;
205
    FieldValues['_dThr_App_'] := FMatiere.PBdThrApp.Text;
206
    FieldValues['_TPhe_'] := FMatiere.PBTPhe.Text;
207
    FieldValues['_dPhe_Std_'] := FMatiere.PBdPheStd.Text;
208
    FieldValues['_dPhe_App_'] := FMatiere.PBdPheApp.Text;
209
    FieldValues['_TTyr_'] := FMatiere.PBTTyr.Text;
210
    FieldValues['_dTyr_Std_'] := FMatiere.PBdTyrStd.Text;
211
    FieldValues['_dTyr_App_'] := FMatiere.PBdTyrApp.Text;
212
    FieldValues['_TLeu_'] := FMatiere.PBTLeu.Text;
213
    FieldValues['_dLeu_Std_'] := FMatiere.PBdLeuStd.Text;
214
    FieldValues['_dLeu_App_'] := FMatiere.PBdLeuApp.Text;
215
    FieldValues['_TIle_'] := FMatiere.PBTIle.Text;
216
    FieldValues['_dIle_Std_'] := FMatiere.PBdIleStd.Text;
217
    FieldValues['_dIle_App_'] := FMatiere.PBdIleApp.Text;
218
    FieldValues['_TVal_'] := FMatiere.PBTVal.Text;
219
    FieldValues['_dVal_Std_'] := FMatiere.PBdValStd.Text;
220
    FieldValues['_dVal_App_'] := FMatiere.PBdValApp.Text;
221
    FieldValues['_THis_'] := FMatiere.PBTHis.Text;
222
    FieldValues['_dHis_Std_'] := FMatiere.PBdHisStd.Text;
223
    FieldValues['_dHis_App_'] := FMatiere.PBdHisApp.Text;
224
    FieldValues['_TArg_'] := FMatiere.PBTArg.Text;
225
    FieldValues['_dArg_Std_'] := FMatiere.PBdArgStd.Text;
226
    FieldValues['_dArg_App_'] := FMatiere.PBdArgApp.Text;
227
    FieldValues['_TMetCys_'] := FMatiere.PBTMetCys.Text;
228
    FieldValues['_dMetCys_Std_'] := FMatiere.PBdMetCysStd.Text;
229
    FieldValues['_dMetCys_App_'] := FMatiere.PBdMetCysApp.Text;
230
    FieldValues['_TPheTyr_'] := FMatiere.PBTPheTyr.Text;
231
    FieldValues['_dPheTyr_Std_'] := FMatiere.PBdPheTyrStd.Text;
232
    FieldValues['_dPheTyr_App_'] := FMatiere.PBdPheTyrApp.Text;
233
    Post;
234
  end ;
235
  QRMMemo.Lines.Add(FMatiere.CBMatiere.Hint);
236
  QRLCompo.Caption := FMatiere.Hint;
237
  QRLTAA.Caption := FMatiere.GBTAA.Caption;
238
  QRLdAA.Caption := FMatiere.GBdAA.Caption;
239
  RegisterPreviewClass(TQRPrevRapInterface);
240
//  QRRapport.PreviewModal;
241
//  RegisterPreviewClass(TQRStandardPreviewInterface);
242
end;
243

    
244
end.