-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlgDivision.dfm
570 lines (566 loc) · 16 KB
/
dlgDivision.dfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
object Division: TDivision
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Divisions : Age bracket and gender.'
ClientHeight = 711
ClientWidth = 737
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
KeyPreview = True
Position = poMainFormCenter
ShowHint = True
OnCreate = FormCreate
OnDestroy = FormDestroy
OnKeyDown = FormKeyDown
OnShow = FormShow
TextHeight = 21
object Panel2: TPanel
Left = 0
Top = 670
Width = 737
Height = 41
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
ExplicitTop = 669
ExplicitWidth = 733
DesignSize = (
737
41)
object Label5: TLabel
Left = 7
Top = 6
Width = 412
Height = 21
Caption = 'A division is an age range (inclusive) with a specific gender. '
end
object btnClose: TButton
Left = 623
Top = 6
Width = 88
Height = 27
Anchors = [akTop, akRight]
Caption = 'Close'
TabOrder = 0
OnClick = btnCloseClick
ExplicitLeft = 619
end
end
object PageControl1: TPageControl
Left = 0
Top = 0
Width = 737
Height = 670
ActivePage = TabSheet3
Align = alClient
TabOrder = 1
ExplicitWidth = 733
ExplicitHeight = 669
object TabSheet3: TTabSheet
Caption = 'Divisions'
DesignSize = (
729
634)
object DBGrid1: TDBGrid
Left = 3
Top = 16
Width = 638
Height = 620
Anchors = [akLeft, akTop, akBottom]
DataSource = dsDivision
Options = [dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -16
TitleFont.Name = 'Segoe UI'
TitleFont.Style = []
Columns = <
item
Expanded = False
FieldName = 'Caption'
Visible = True
end
item
Expanded = False
FieldName = 'AgeFrom'
Visible = True
end
item
Expanded = False
FieldName = 'AgeTo'
Visible = True
end
item
DropDownRows = 4
Expanded = False
FieldName = 'luGender'
Visible = True
end>
end
object DBNavigator1: TDBNavigator
Left = 658
Top = 16
Width = 65
Height = 600
DataSource = dsDivision
Kind = dbnVertical
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
end
object TabSheet2: TTabSheet
Caption = 'Reports'
object Label10: TLabel
Left = 179
Top = 13
Width = 452
Height = 63
Caption =
'List all the available members for each division. Member'#39's age ' +
'calculated on '#39'start of swimming season'#39'. Active members appear ' +
'in this list. '
WordWrap = True
end
object btnDivMembers: TButton
Left = 15
Top = 18
Width = 158
Height = 25
Caption = 'Division Members'
TabOrder = 0
OnClick = btnDivMembersClick
end
end
end
object qryDivision: TFDQuery
ActiveStoredUsage = [auDesignTime]
Active = True
IndexFieldNames = 'ScoreDivisionID'
Connection = SCM.scmConnection
UpdateOptions.UpdateTableName = 'SwimClubMeet..ScoreDivision'
UpdateOptions.KeyFields = 'ScoreDivisionID'
SQL.Strings = (
'USE [SwimClubMeet]'
';'
''
'DECLARE @SwimClubID AS int;'
''
'SET @SwimClubID = :SWIMCLUBID;'
''
'SELECT [ScoreDivisionID]'
' ,[SwimClubID]'
' ,[Caption]'
' ,[AgeFrom]'
' ,[AgeTo]'
' ,[GenderID]'
' FROM [dbo].[ScoreDivision]'
'WHERE SwimClubID = @SwimCLubID'
';')
Left = 336
Top = 528
ParamData = <
item
Name = 'SWIMCLUBID'
DataType = ftInteger
ParamType = ptInput
Value = 1
end>
object qryDivisionScoreDivisionID: TFDAutoIncField
FieldName = 'ScoreDivisionID'
Origin = 'ScoreDivisionID'
ProviderFlags = [pfInWhere, pfInKey]
ReadOnly = True
Visible = False
end
object qryDivisionSwimClubID: TIntegerField
FieldName = 'SwimClubID'
Origin = 'SwimClubID'
Visible = False
end
object qryDivisionCaption: TWideStringField
DisplayLabel = 'Description of Division'
DisplayWidth = 34
FieldName = 'Caption'
Origin = 'Caption'
Size = 128
end
object qryDivisionAgeFrom: TIntegerField
Alignment = taCenter
DisplayLabel = 'Age From'
DisplayWidth = 10
FieldName = 'AgeFrom'
Origin = 'AgeFrom'
DisplayFormat = '##0'
end
object qryDivisionAgeTo: TIntegerField
Alignment = taCenter
DisplayLabel = 'Age To'
DisplayWidth = 10
FieldName = 'AgeTo'
Origin = 'AgeTo'
DisplayFormat = '##0'
end
object qryDivisionluGender: TStringField
DisplayLabel = 'Gender'
DisplayWidth = 10
FieldKind = fkLookup
FieldName = 'luGender'
LookupDataSet = tblGender
LookupKeyFields = 'GenderID'
LookupResultField = 'Caption'
KeyFields = 'GenderID'
Lookup = True
end
object qryDivisionGenderID: TIntegerField
FieldName = 'GenderID'
Origin = 'GenderID'
Visible = False
end
end
object dsDivision: TDataSource
DataSet = qryDivision
Left = 408
Top = 528
end
object tblGender: TFDTable
ActiveStoredUsage = [auDesignTime]
Active = True
IndexFieldNames = 'GenderID'
Connection = SCM.scmConnection
ResourceOptions.AssignedValues = [rvEscapeExpand]
UpdateOptions.UpdateTableName = 'Gender'
UpdateOptions.KeyFields = 'GenderID'
TableName = 'Gender'
Left = 338
Top = 472
end
object luGender: TDataSource
DataSet = tblGender
Left = 410
Top = 472
end
object frxDivMembers: TfrxReport
Version = '6.6.11'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 43429.469572048600000000
ReportOptions.LastChange = 44894.496938391200000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
''
'begin'
''
'end.')
Left = 464
Top = 240
Datasets = <
item
DataSet = frxDBDSRptHeader
DataSetName = 'dsHeader'
end
item
DataSet = frxDSDivMembers
DataSetName = 'frxDS'
end>
Variables = <>
Style = <>
object Data: TfrxDataPage
Height = 1000.000000000000000000
Width = 1000.000000000000000000
end
object Page1: TfrxReportPage
PaperWidth = 210.000000000000000000
PaperHeight = 297.000000000000000000
PaperSize = 9
LeftMargin = 10.000000000000000000
RightMargin = 10.000000000000000000
TopMargin = 10.000000000000000000
BottomMargin = 10.000000000000000000
Columns = 4
ColumnWidth = 47.500000000000000000
ColumnPositions.Strings = (
'0'
'47.5'
'95'
'142.5')
Frame.Typ = []
MirrorMode = []
object PageHeader1: TfrxPageHeader
FillType = ftBrush
Frame.Typ = []
Height = 49.133890000000000000
Top = 18.897650000000000000
Width = 718.110700000000000000
object frxDScSwimClub: TfrxMemoView
AllowVectorExport = True
Left = 3.779530000000000000
Width = 400.630180000000000000
Height = 18.897650000000000000
DataField = 'ClubName'
DataSet = frxDBDSRptHeader
DataSetName = 'dsHeader'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold]
Frame.Typ = []
Memo.UTF8W = (
'[dsHeader."ClubName"]')
ParentFont = False
end
object Line1: TfrxLineView
AllowVectorExport = True
Left = 1.779530000000000000
Top = 43.590600000000000000
Width = 714.331170000000000000
StretchMode = smMaxHeight
Color = clBlack
Frame.Typ = [ftTop]
Frame.TopLine.Width = 2.000000000000000000
Frame.BottomLine.Width = 4.000000000000000000
end
object frxDBDataset2NickName: TfrxMemoView
AllowVectorExport = True
Left = 4.705455930000000000
Top = 22.677180000000000000
Width = 400.630180000000000000
Height = 18.897650000000000000
DataField = 'ClubNickName'
DataSet = frxDBDSRptHeader
DataSetName = 'dsHeader'
Frame.Typ = []
Memo.UTF8W = (
'[dsHeader."ClubNickName"]')
end
object dsHeaderStartOfSwimSeason: TfrxMemoView
IndexTag = 1
AllowVectorExport = True
Left = 441.666666670000000000
Top = 21.843090740000000000
Width = 272.126160000000000000
Height = 18.897650000000000000
AutoWidth = True
DataSet = frxDBDSRptHeader
DataSetName = 'dsHeader'
DisplayFormat.FormatStr = 'mmmm dd, yyyy'
DisplayFormat.Kind = fkDateTime
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = []
HAlign = haRight
Memo.UTF8W = (
'Start of Swimming Season : [dsHeader."StartOfSwimSeason"]')
ParentFont = False
end
end
object PageFooter1: TfrxPageFooter
FillType = ftBrush
Frame.Typ = []
Height = 22.677180000000000000
Top = 287.244280000000000000
Width = 718.110700000000000000
object Page: TfrxMemoView
AllowVectorExport = True
Left = 279.685220000000000000
Top = 1.889765000000000000
Width = 158.740260000000000000
Height = 18.897650000000000000
AutoWidth = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'Segoe UI'
Font.Style = []
Frame.Typ = []
Memo.UTF8W = (
'[Page#] of [TotalPages#]')
ParentFont = False
end
object Date: TfrxMemoView
AllowVectorExport = True
Left = 3.779530000000000000
Top = 0.779530000000000000
Width = 105.826840000000000000
Height = 18.897650000000000000
AutoWidth = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'Segoe UI'
Font.Style = []
Frame.Typ = []
Memo.UTF8W = (
'Printed on [Date]')
ParentFont = False
end
end
object GroupHeader1: TfrxGroupHeader
FillType = ftBrush
Frame.Typ = []
Height = 19.790043330000000000
Top = 128.504020000000000000
Width = 179.527675000000000000
Condition = 'frxDS."ScoreDivisionID"'
KeepTogether = True
object frxDSDivisionStr: TfrxMemoView
AllowVectorExport = True
Width = 175.722016670000000000
Height = 17.343846670000000000
AutoWidth = True
DataSet = frxDSDivMembers
DataSetName = 'frxDS'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
Frame.Typ = [ftBottom]
Memo.UTF8W = (
'[frxDS."Caption"]')
ParentFont = False
end
end
object MasterData1: TfrxMasterData
FillType = ftBrush
Frame.Typ = []
Height = 18.897650000000000000
Top = 170.078850000000000000
Width = 179.527675000000000000
DataSet = frxDSDivMembers
DataSetName = 'frxDS'
KeepTogether = True
RowCount = 0
object frxDSEventStr: TfrxMemoView
AllowVectorExport = True
Left = 3.779530000000000000
Width = 169.847866670000000000
Height = 18.897650000000000000
AutoWidth = True
DataSet = frxDSDivMembers
DataSetName = 'frxDS'
Frame.Typ = []
Memo.UTF8W = (
'[frxDS."ucFName"]')
end
end
object GroupFooter1: TfrxGroupFooter
FillType = ftBrush
Frame.Typ = []
Height = 15.118120000000000000
Top = 211.653680000000000000
Width = 179.527675000000000000
end
end
end
object frxDSDivMembers: TfrxDBDataset
UserName = 'frxDS'
CloseDataSource = True
DataSet = qryDivMembers
BCDToCurrency = False
Left = 368
Top = 240
end
object qryDivMembers: TFDQuery
ActiveStoredUsage = [auDesignTime]
IndexesActive = False
IndexFieldNames = 'ScoreDivisionID'
Connection = SCM.scmConnection
FormatOptions.AssignedValues = [fvFmtDisplayDateTime, fvFmtDisplayDate, fvFmtDisplayTime]
FormatOptions.FmtDisplayDateTime = 'dd mmm YYYY HH:MM'
FormatOptions.FmtDisplayDate = 'dd mmm YYYYY'
FormatOptions.FmtDisplayTime = 'nn:mm.zzz'
UpdateOptions.AssignedValues = [uvEDelete, uvEInsert, uvEUpdate]
UpdateOptions.EnableDelete = False
UpdateOptions.EnableInsert = False
UpdateOptions.EnableUpdate = False
UpdateOptions.KeyFields = 'ScoreDivisionID'
SQL.Strings = (
'USE SwimClubMeet'
''
'DECLARE @SeedDate AS DATETIME;'
''
'SET @SeedDate = :SEEDDATE;'
''
'IF (@SeedDate IS NULL)'
#9'SET @SeedDate = GETDATE();'
''
'SELECT ScoreDivision.ScoreDivisionID'
#9',ScoreDivision.Caption'
#9',Member.MemberID'
#9',Member.DOB'
#9',dbo.SwimmerAge(@SeedDate, Member.DOB) AS AGE'
#9',Member.IsActive'
#9',CONCAT ('
#9#9'UPPER(Member.LastName)'
#9#9','#39', '#39
#9#9',Member.FirstName'
#9#9') AS ucFName'
#9',ScoreDivision.AgeFrom'
#9',ScoreDivision.AgeTo'
#9',ScoreDivision.GenderID'
'FROM ScoreDivision'
'INNER JOIN Member ON ScoreDivision.GenderID = Member.GenderID'
'WHERE (Member.IsActive = 1)'
#9'AND (dbo.SwimmerAge(@SeedDate, Member.DOB) >= ScoreDivision.Age' +
'From)'
#9'AND (dbo.SwimmerAge(@SeedDate, Member.DOB) <= ScoreDivision.Age' +
'To)'
'ORDER BY ScoreDivision.ScoreDivisionID, Member.LastName'
'')
Left = 264
Top = 240
ParamData = <
item
Name = 'SEEDDATE'
DataType = ftDateTime
ParamType = ptInput
Value = Null
end>
end
object qryRptHeader: TFDQuery
ActiveStoredUsage = [auDesignTime]
Active = True
Connection = SCM.scmConnection
SQL.Strings = (
'USE SwimClubMeet;'
''
'DECLARE @SwimClubID AS INTEGER;'
'SET @SwimClubID = 1; -- :SWIMCLUBID'
''
'-- Select rows from a Table or View '#39'[SwimClub]'#39' in schema '#39'[dbo' +
']'#39
'SELECT SwimClubID,'
' StartOfSwimSeason, '
' SUBSTRING(Caption, 0, 50) AS ClubName,'
' SUBSTRING(NickName, 0, 50) AS ClubNickName,'
' FORMAT(StartOfSwimSeason, '#39'ddd dd MMM yyyy'#39') AS SeasonSta' +
'rt'
'FROM [dbo].[SwimClub]'
'WHERE SwimClubID = @SwimClubID;')
Left = 264
Top = 184
end
object frxDBDSRptHeader: TfrxDBDataset
UserName = 'dsHeader'
CloseDataSource = False
DataSet = qryRptHeader
BCDToCurrency = False
Left = 368
Top = 184
end
end