📄 frmrep.frm
字号:
VERSION 5.00
Begin VB.Form frmRepExcept
Caption = "Report"
ClientHeight = 6810
ClientLeft = 60
ClientTop = 345
ClientWidth = 8925
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6810
ScaleWidth = 8925
WindowState = 2 'Maximized
Begin VB.CommandButton Command3
Caption = "Print"
Height = 495
Left = 3480
TabIndex = 5
Top = 4440
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "Preview"
Height = 495
Left = 1320
TabIndex = 4
Top = 4440
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "Exit"
Height = 495
Left = 5760
TabIndex = 3
Top = 4440
Width = 1215
End
Begin VB.Frame frmlist
Height = 3495
Left = 600
TabIndex = 0
Top = 480
Width = 7095
Begin VB.TextBox txtcode
Height = 285
Left = 4200
TabIndex = 8
Top = 2160
Width = 2055
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 840
Width = 2175
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 1
Top = 2160
Width = 2175
End
Begin VB.Label Label2
Caption = "Printing Criteria2:"
Height = 255
Left = 240
TabIndex = 7
Top = 1680
Width = 1815
End
Begin VB.Label Label1
Caption = "Printing Criteria1:"
Height = 255
Left = 360
TabIndex = 6
Top = 480
Width = 1815
End
End
End
Attribute VB_Name = "frmRepExcept"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_LostFocus()
'If Combo1.Text = "By Entity" Then
' txtcode.Enabled = False
' Else
' txtcode.Enabled = True
' End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Dim ccode As Long
Set DataEnv = New DataEnv
Select Case Combo1.Text
Case "By Entity"
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, 1, 99999
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, 1, 99999
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, 1, 99999
RepExceptAll.Show
End If
Case "By Customer Tank"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Customer Tank Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping ccode, ccode, 1, 99999
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping ccode, ccode, 1, 99999
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping ccode, ccode, 1, 99999
RepExceptAll.Show
End If
Case "By Product"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Product Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, ccode, ccode
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, ccode, ccode
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, ccode, ccode
RepExceptAll.Show
End If
End Select
End Sub
Private Sub Command3_Click()
Dim ccode As Long
Set DataEnv = New DataEnv
Select Case Combo1.Text
Case "By Entity"
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, 1, 99999
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, 1, 99999
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, 1, 99999
RepExceptAll.PrintReport False, rptRangeAllPages
End If
Case "By Customer Tank"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Customer Tank Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping ccode, ccode, 1, 99999
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping ccode, ccode, 1, 99999
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping ccode, ccode, 1, 99999
RepExceptAll.PrintReport False, rptRangeAllPages
End If
Case "By Product"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Product Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, ccode, ccode
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, ccode, ccode
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, ccode, ccode
RepExceptAll.PrintReport False, rptRangeAllPages
End If
End Select
End Sub
Private Sub Form_Load()
Combo1.AddItem ("By Entity")
Combo1.AddItem ("By Customer Tank")
Combo1.AddItem ("By Product")
Combo1.ListIndex = 0
Combo2.AddItem ("By All")
Combo2.AddItem ("By SS")
Combo2.AddItem ("By Min")
Combo2.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -