📄 frmbiaobiao.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmBiaoBiao
BorderStyle = 1 'Fixed Single
Caption = "生成报表"
ClientHeight = 2715
ClientLeft = 45
ClientTop = 330
ClientWidth = 5925
Icon = "frmBiaoBiao.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2715
ScaleWidth = 5925
StartUpPosition = 1 '所有者中心
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 840
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2040
Visible = 0 'False
Width = 1140
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmBiaoBiao.frx":0442
Left = 1800
List = "frmBiaoBiao.frx":0449
Style = 2 'Dropdown List
TabIndex = 9
Top = 1440
Width = 3735
End
Begin MSComCtl2.DTPicker DTP2
Height = 375
Left = 3840
TabIndex = 7
Top = 840
Width = 1695
_ExtentX = 2990
_ExtentY = 661
_Version = 393216
Format = 23789568
CurrentDate = 36936
End
Begin MSComCtl2.DTPicker DTP1
Height = 375
Left = 1800
TabIndex = 5
Top = 840
Width = 1695
_ExtentX = 2990
_ExtentY = 661
_Version = 393216
Format = 23789568
CurrentDate = 36936
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmBiaoBiao.frx":0459
Left = 1800
List = "frmBiaoBiao.frx":0466
Locked = -1 'True
Style = 2 'Dropdown List
TabIndex = 2
Top = 360
Width = 3735
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 4080
TabIndex = 1
Top = 2040
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "生成报表"
Default = -1 'True
Height = 375
Left = 2520
TabIndex = 0
Top = 2040
Width = 1215
End
Begin VB.Label Label4
Caption = "选择计算机:"
Height = 255
Left = 240
TabIndex = 8
Top = 1440
Width = 1455
End
Begin VB.Label Label3
Caption = "到"
Height = 255
Left = 3600
TabIndex = 6
Top = 960
Width = 375
End
Begin VB.Label Label2
Caption = "报表日期:"
Height = 255
Left = 240
TabIndex = 4
Top = 960
Width = 1575
End
Begin VB.Label Label1
Caption = "报表类型:"
Height = 255
Left = 240
TabIndex = 3
Top = 360
Width = 1575
End
End
Attribute VB_Name = "frmBiaoBiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'生成报表
On Error Resume Next
Me.Visible = False
frmJinDu.Show , frmMain
DoEvents
Screen.MousePointer = 11
'frmPrinter.RTBox.Text = ""
'frmPrinter.RTBox.SelFontSize = 22
'frmPrinter.RTBox.SelBold = True
'frmPrinter.RTBox.SelAlignment = 2
'frmPrinter.RTBox.SelText = Combo1.Text & "报表" + vbCrLf
'frmPrinter.RTBox.SelFontSize = 9
'frmPrinter.RTBox.SelItalic = True
'If DTP1.Year = DTP2.Year And DTP1.Month = DTP2.Month And DTP1.Day = DTP2.Day Then
'frmPrinter.RTBox.SelText = Format(DTP1.Value, "long date") + vbCrLf
'Else
'frmPrinter.RTBox.SelText = "从" + Format(DTP1.Value, "long date") + "到" + Format(DTP2.Value, "long date") + vbCrLf
'End If
' frmPrinter.RTBox.SelAlignment = 0
'frmPrinter.RTBox.SelItalic = False
'frmPrinter.RTBox.SelText = " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + vbCrLf
Select Case Combo1.Text
Case "机时收费表"
'frmPrinter.RTBox.SelFontSize = 11
'frmPrinter.RTBox.SelBold = True
'frmPrinter.RTBox.SelText = " 机号 开始时间 结束时间 上机方式 应收金额 实收金额 结帐管理员 上机客户" + vbCrLf
'frmPrinter.RTBox.SelBold = False
'frmPrinter.RTBox.SelFontSize = 9
'frmPrinter.RTBox.SelText = " ─────────────────────────────────────────────────────────" + vbCrLf
Data1.DatabaseName = SystemPath + "dbase.mdb"
Data1.Connect = ";pwd=123456"
Data1.RecordSource = "select * from sjlszb where 结束时间>=#" & DTP1.Value & "# and 结束时间<=#" & DTP2.Value & "#"
Data1.Refresh
Data1.Recordset.MoveLast
With Data1.Recordset
.MoveFirst
Dim zYsh As Double, zSsh As Double
For i = 0 To .Fields.Count - 1
frmPrnBaoBiao.ListView1.ColumnHeaders.Add , , .Fields(i).Name
Next i
For i = 1 To .RecordCount
frmJinDu.ProgressBar1.Value = Int(i * 100 / .RecordCount)
DoEvents
' If .Fields("结束时间") > DTP1.Value And .Fields("结束时间") < DTP2.Value And (Combo2.Text = "全部计算机" Or .Fields("机号") = Combo2.ItemData(Combo2.ListIndex)) Then
n = n + 1
frmPrnBaoBiao.ListView1.ListItems.Add n, , .Fields("ID")
'For k = 0 To .RecordCount - 1
'frmPrnBaoBiao.ListView1.ListItems.Add i + 1, , .Fields(0)
'For j = 1 To .Fields.Count - 1
'frmPrnBaoBiao.ListView1.ListItems(n).SubItems(j) = .Fields(j)
'Next j
frmPrnBaoBiao.ListView1.ColumnHeaders(1).Width = 600
frmPrnBaoBiao.ListView1.ColumnHeaders(2).Width = 800
frmPrnBaoBiao.ListView1.ColumnHeaders(3).Width = 1600
frmPrnBaoBiao.ListView1.ColumnHeaders(4).Width = 1600
frmPrnBaoBiao.ListView1.ColumnHeaders(5).Width = 1000
frmPrnBaoBiao.ListView1.ColumnHeaders(6).Width = 1000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -