📄 报表.frm
字号:
Caption = "查询统计(&S)"
Height = 495
Left = -67920
TabIndex = 26
Top = 1440
Width = 1575
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "报表.frx":08F3
Height = 5055
Left = -75000
TabIndex = 25
Top = 2280
Width = 8535
_ExtentX = 15055
_ExtentY = 8916
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label14
Caption = "Label14"
Height = 495
Left = -72840
TabIndex = 45
Top = 7320
Width = 5175
End
Begin VB.Label Label13
Caption = "卡结的金额为:"
Height = 495
Left = -74400
TabIndex = 44
Top = 7440
Width = 6255
End
Begin VB.Label Label12
Caption = "这个月的收入为"
Height = 495
Left = -74160
TabIndex = 43
Top = 7440
Width = 5655
End
Begin VB.Label Label11
Caption = "Label11"
Height = 495
Left = 1440
TabIndex = 40
Top = 7440
Width = 3855
End
Begin VB.Label Label10
Caption = "起始日期"
Height = 375
Left = 240
TabIndex = 39
Top = 1320
Width = 735
End
Begin VB.Label Label9
Caption = "截止日期"
Height = 255
Left = 240
TabIndex = 38
Top = 1920
Width = 855
End
Begin VB.Label Label8
Caption = "截止日期"
Height = 255
Left = -74640
TabIndex = 35
Top = 1560
Width = 855
End
Begin VB.Label Label7
Caption = "起始日期"
Height = 375
Left = -74640
TabIndex = 34
Top = 960
Width = 735
End
Begin VB.Label Label6
Caption = "截止日期"
Height = 255
Left = -74760
TabIndex = 31
Top = 1680
Width = 855
End
Begin VB.Label Label5
Caption = "起始日期"
Height = 375
Left = -74760
TabIndex = 30
Top = 1080
Width = 735
End
Begin VB.Label Label4
Caption = "员工编号"
Height = 255
Left = 840
TabIndex = 27
Top = 840
Width = 975
End
Begin VB.Label Label3
Caption = "月份"
Height = 375
Left = -70080
TabIndex = 24
Top = 1320
Width = 855
End
Begin VB.Label Label2
Caption = "年"
Height = 375
Left = -71760
TabIndex = 23
Top = 1320
Width = 495
End
Begin VB.Label Label1
Caption = "请选择"
Height = 255
Left = -74040
TabIndex = 22
Top = 1320
Width = 855
End
End
End
Attribute VB_Name = "frmreport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim flag As Integer
Dim mindate As String
Dim maxdate As String
Dim cc As String
Dim dd As String
Dim ee As String
Dim rs As ADODB.Recordset
Dim bu As String
Private Sub Command1_Click()
Dim monthdate As String
Dim sum As String
sum = 0
bu = "Yes"
If Combo19.Text = "" Or Combo20.Text = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
monthdate = Combo19.Text + "-" + Combo20.Text + "%"
Adodc1.RecordSource = "select * from 客户表 where 离场时间 like " + "'" + monthdate + "'" + "and 是否结算=" + "'" + bu + "'"
Adodc1.Refresh
Set rs = Adodc1.Recordset
With rs
Do While Not rs.EOF
sum = sum + !实收金额
rs.MoveNext
Loop
End With
Label12.Caption = "这个月的收入为:" + Str(sum) + "元"
End If
End Sub
Private Sub Command2_Click()
Dim sum As Integer
'Dim m As Integer
'm = 0
bu = "Yes"
sum = 0
If Text3.Text = "" Or Combo18 = "" Or Combo17 = "" Or Combo16 = "" Or Combo15 = "" Or Combo14 = "" Or Combo13 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
dd = Combo18.Text + "-" + Combo17.Text + "-" + Combo16.Text
ee = Combo15.Text + "-" + Combo14.Text + "-" + Combo13.Text
Adodc2.RecordSource = "select * from 服务表 where 服务员=" + "'" + Text3.Text + "'" + "and 日期 between" + "#" + dd + "#" + " and " + "#" + ee + "#" + "and 是否结算=" + "'" + bu + "'"
Adodc2.Refresh
Set rs = Adodc2.Recordset
With rs
Do While Not rs.EOF
sum = sum + !单价
rs.MoveNext
Loop
End With
Label11.Caption = "所服务的价值为:" + Str(sum) + "元"
End If
End Sub
Private Sub Command3_Click()
Dim sum As Integer
sum = 0
bu = "Yes"
If Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or Combo4 = "" Or Combo5 = "" Or Combo6 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
dd = Combo1.Text + "-" + Combo2.Text + "-" + Combo3.Text
ee = Combo4.Text + "-" + Combo5.Text + "-" + Combo6.Text
Adodc3.RecordSource = "select 离场时间,实收金额,卡结,现金结,结算员 from 客户表 where 离场时间 between" + "#" + dd + "#" + " and" + "#" + ee + "#" + "and 是否结算=" + "'" + bu + "'"
Adodc3.Refresh
Set rs = Adodc3.Recordset
With rs
Do While Not rs.EOF
sum = sum + !卡结
rs.MoveNext
Loop
End With
Label13.Caption = "卡结的金额为:" + Str(sum) + "元"
End If
End Sub
Private Sub Command4_Click()
Dim sum As Integer
sum = 0
bu = "Yes"
If Combo7 = "" Or Combo8 = "" Or Combo9 = "" Or Combo10 = "" Or Combo11 = "" Or Combo12 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
dd = Combo7.Text + "-" + Combo8.Text + "-" + Combo9.Text
ee = Combo10.Text + "-" + Combo11.Text + "-" + Combo12.Text
Adodc4.RecordSource = "select 离场时间,实收金额,卡结,现金结,结算员 from 客户表 where 离场时间 between" + "#" + dd + "#" + " and " + "#" + ee + "#" + "and 是否结算=" + "'" + bu + "'"
Adodc4.Refresh
Set rs = Adodc4.Recordset
With rs
Do While Not rs.EOF
sum = sum + !现金结
rs.MoveNext
Loop
End With
Label14.Caption = "现金结的金额为:" + Str(sum) + "元"
End If
End Sub
Private Sub Command5_Click()
bu = "Yes"
If Text3.Text = "" Or Combo18 = "" Or Combo17 = "" Or Combo16 = "" Or Combo15 = "" Or Combo14 = "" Or Combo13 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
DataEnvironment1.Connection1.Open
dd = Combo18.Text + "-" + Combo17.Text + "-" + Combo16.Text
ee = Combo15.Text + "-" + Combo14.Text + "-" + Combo13.Text
cc = Text3.Text
Call DataEnvironment1.Command2(cc, dd, ee, bu)
Load DataReport2
DataReport2.show
DataReport2.Refresh
DataEnvironment1.Connection1.Close
End If
End Sub
Private Sub Command6_Click()
bu = "Yes"
If Combo19.Text = "" Or Combo20.Text = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
DataEnvironment1.Connection1.Open
cc = Combo19.Text + "-" + Combo20.Text + "%"
Call DataEnvironment1.Command1(cc, bu)
Load DataReport1
DataReport1.show
DataReport1.Refresh
DataEnvironment1.Connection1.Close
End If
End Sub
Private Sub Command7_Click()
bu = "Yes"
If Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or Combo4 = "" Or Combo5 = "" Or Combo6 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
DataEnvironment1.Connection1.Open
dd = Combo1.Text + "-" + Combo2.Text + "-" + Combo3.Text
ee = Combo4.Text + "-" + Combo5.Text + "-" + Combo6.Text
Call DataEnvironment1.Command3(dd, ee, bu)
Load DataReport3
DataReport3.show
DataReport3.Refresh
DataEnvironment1.Connection1.Close
End If
End Sub
Private Sub Command8_Click()
bu = "Yes"
If Combo7 = "" Or Combo8 = "" Or Combo9 = "" Or Combo10 = "" Or Combo11 = "" Or Combo12 = "" Then
MsgBox "您所输入的数字不全!", , "提示!"
Else
DataEnvironment1.Connection1.Open
dd = Combo7.Text + "-" + Combo8.Text + "-" + Combo9.Text
ee = Combo10.Text + "-" + Combo11.Text + "-" + Combo12.Text
Call DataEnvironment1.Command4(dd, ee, bu)
Load DataReport4
DataReport4.show
DataReport4.Refresh
DataEnvironment1.Connection1.Close
End If
End Sub
'Private Sub SSTab1_KeyPress(KeyAscii As Integer)
'Select Case SSTab1.Tab
'Case Is = 0
'If KeyAscii = 13 Then
' Command1_Click
'End If
'Case Is = 1
'If KeyAscii = 13 Then
'Command2_Click
'End If
'Case Is = 2
' If KeyAscii = 13 Then
'Command3_Click
'End If
'Case Is = 3
'If KeyAscii = 13 Then
'Command4_Click
' End If
'End Select
'End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -