home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Groupcond
- BackColor = &H00C0C0C0&
- Caption = "Group Condition"
- ClientHeight = 7125
- ClientLeft = 1890
- ClientTop = 1440
- ClientWidth = 3420
- Height = 7530
- Left = 1830
- LinkTopic = "Form1"
- ScaleHeight = 7125
- ScaleWidth = 3420
- Top = 1095
- Width = 3540
- Begin SSPanel Statusbar
- Alignment = 1 'Left Justify - MIDDLE
- BevelWidth = 2
- BorderWidth = 1
- Height = 465
- Left = 0
- TabIndex = 19
- Top = 6660
- Width = 3435
- End
- Begin CommandButton Command3
- Caption = "Reset"
- Height = 420
- Left = 1800
- TabIndex = 18
- Top = 6120
- Width = 1275
- End
- Begin CommandButton Command2
- Caption = "Done"
- Height = 420
- Left = 360
- TabIndex = 17
- Top = 6120
- Width = 1275
- End
- Begin SSPanel Panel3D3
- Alignment = 1 'Left Justify - MIDDLE
- BevelInner = 1 'Inset
- BorderWidth = 1
- Height = 1860
- Left = 360
- TabIndex = 8
- Top = 3645
- Width = 2715
- Begin SSFrame Frame3D2
- ForeColor = &H00000000&
- Height = 1005
- Left = 180
- TabIndex = 10
- Top = 630
- Width = 2355
- Begin SSOption Option3D4
- Caption = "Descending"
- Height = 285
- Index = 1
- Left = 180
- TabIndex = 3
- TabStop = 0 'False
- Top = 585
- Width = 1365
- End
- Begin SSOption Option3D4
- Caption = "Ascending"
- Height = 240
- Index = 0
- Left = 180
- TabIndex = 5
- Top = 225
- Value = -1 'True
- Width = 1365
- End
- End
- Begin SSFrame Frame3D1
- ForeColor = &H00000000&
- Height = 465
- Left = 180
- TabIndex = 9
- Top = 90
- Width = 2355
- Begin Label Label3
- BackColor = &H00C0C0C0&
- Caption = "Sort Direction of Group"
- Height = 240
- Left = 180
- TabIndex = 6
- Top = 180
- Width = 2085
- End
- End
- End
- Begin SSPanel Panel3D2
- Alignment = 1 'Left Justify - MIDDLE
- BevelInner = 1 'Inset
- BorderWidth = 1
- Height = 510
- Left = 360
- TabIndex = 2
- Top = 900
- Width = 2715
- Begin TextBox Text1
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 420
- Left = 90
- TabIndex = 7
- Top = 45
- Width = 2535
- End
- End
- Begin SSPanel Panel3D1
- Alignment = 1 'Left Justify - MIDDLE
- BevelInner = 1 'Inset
- BorderWidth = 1
- Height = 2085
- Left = 360
- TabIndex = 1
- Top = 1485
- Width = 2715
- Begin SSFrame Frame3D4
- ForeColor = &H00000000&
- Height = 1320
- Left = 180
- TabIndex = 12
- Top = 585
- Width = 2355
- Begin SSOption Option3D1
- Caption = "Other"
- Height = 240
- Index = 2
- Left = 180
- TabIndex = 16
- TabStop = 0 'False
- Top = 900
- Width = 1185
- End
- Begin SSOption Option3D1
- Caption = "Boolean"
- Height = 240
- Index = 1
- Left = 180
- TabIndex = 15
- TabStop = 0 'False
- Top = 585
- Width = 1095
- End
- Begin SSOption Option3D1
- Caption = "Date"
- Height = 195
- Index = 0
- Left = 180
- TabIndex = 14
- Top = 225
- Value = -1 'True
- Width = 1545
- End
- End
- Begin SSFrame Frame3D3
- ForeColor = &H00000000&
- Height = 420
- Left = 180
- TabIndex = 11
- Top = 90
- Width = 2355
- Begin Label Label2
- BackColor = &H00C0C0C0&
- Caption = "Field Type:"
- Height = 195
- Left = 180
- TabIndex = 13
- Top = 135
- Width = 1365
- End
- End
- End
- Begin CommandButton Command1
- Caption = "More >>>>"
- Height = 420
- Left = 360
- TabIndex = 0
- Top = 5580
- Width = 2715
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- Caption = "Please enter the name of the field you would like to group on:"
- Height = 420
- Left = 90
- TabIndex = 4
- Top = 315
- Width = 3435
- End
- Sub Command1_Click ()
- 'Test to see if the user inputted a field name to group on
- If Text1.Text = "" Then
- MsgBox "Please Enter a field name to group on!"
- Exit Sub
- End If
- If Option3D1(0) = True Then
- Datecond.Show 1 'Show form to make date group conditions
- End If
- If Option3D1(1) = True Then
- BoolCond.Show 1 'Show form to make boolean group conditions
- End If
- If Option3D1(2) = True Then
- 'If the field type is an other then the group should act on any change
- 'Set the group condition
- 'the 3000 pertains to the section code. For 1 group in the report the only section code
- 'would be 3000. If there were more than one group then each subsequent group section would
- 'have a section code of 3001, 3002.....etc. See doc for more information.
- If PESetGroupCondition(JobNum, 3000, gRoupcond.Text1.Text, PE_GC_ANYCHANGE, Sortdir) = False Then
- RCode = GetErrorString(JobNum)
- MsgBox "PESetGroupCondition Error #: " + Str(ErrorCode) + " - " + RCode
- Else
- gRoupcond!Statusbar.Caption = "Group Condition has been set."
- End If
- End If
- End Sub
- Sub Command2_Click ()
- 'Unloads form
- Unload Me
- End Sub
- Sub Command3_Click ()
- 'Resets all field name, field type and sort direction settings
- Text1.Text = ""
- Command1.Visible = True
- Option3D1(0).Value = True
- Option3d4(0).Value = True
- End Sub
- Sub Form_Load ()
- Sortdir = 1
- End Sub
- Sub Option3D1_Click (Index As Integer, Value As Integer)
- 'Set the Fieldtype(i.e. Date, boolean or other)
- Select Case Index
- Case 0:
- FieldType = 1
- Case 1:
- FieldType = 2
- Case 2:
- FieldType = 3
- Command1.Visible = True
- End Select
- 'The command button will actually function differently depending on the
- 'conditions specified above. Therefore, the caption will change.
- If Option3D1(2) = True Then
- Command1.Caption = "Set Group Condition"
- Else
- Command1.Caption = "More >>>"
- End If
- End Sub
- Sub Option3D4_Click (Index As Integer, Value As Integer)
- Command1.Visible = True
- 'Specify Sortdirection of group section
- Select Case Index
- Case 0:
- Sortdir = 1
- Case 1:
- Sortdir = 0
- End Select
- End Sub
-