📄 lqrptfrm.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Lqrptfrm
BackColor = &H00F4FFF5&
BorderStyle = 1 'Fixed Single
Caption = "沥青报表"
ClientHeight = 9270
ClientLeft = 45
ClientTop = 330
ClientWidth = 8070
Icon = "Lqrptfrm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 9270
ScaleWidth = 8070
StartUpPosition = 2 '屏幕中心
Begin MSDBGrid.DBGrid LqgrdDataGrid
Bindings = "Lqrptfrm.frx":0442
Height = 8235
Left = 0
OleObjectBlob = "Lqrptfrm.frx":045F
TabIndex = 3
Top = 495
Width = 8055
End
Begin VB.CommandButton Lqcmdclose
BackColor = &H00C0E0FF&
Caption = "返 回(&R)"
Height = 495
Left = 6960
Style = 1 'Graphical
TabIndex = 1
Top = 8760
Width = 1095
End
Begin VB.CommandButton cmdprt
BackColor = &H00C0E0FF&
Caption = "打印(&P)"
Height = 495
Left = 5760
Style = 1 'Graphical
TabIndex = 0
Top = 8760
Width = 1215
End
Begin VB.Data LqdatPrimaryRS
Appearance = 0 'Flat
BackColor = &H00F4FFF5&
Connect = "Access"
DatabaseName = "D:\河南焦作\Report\Lqreport.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
ForeColor = &H00FF0000&
Height = 495
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "select [日期],[批号],[时间],[沥青] from [report]"
Top = 8760
Width = 5775
End
Begin VB.PictureBox Lqcrystalrpt
Height = 480
Left = 6840
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 4
Top = 360
Width = 1200
End
Begin VB.Label lbllqbt
Alignment = 2 'Center
BackStyle = 0 'Transparent
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 495
Left = 600
TabIndex = 2
Top = 0
Width = 6855
End
End
Attribute VB_Name = "Lqrptfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Option Explicit
'Dim Lqtemptime As String
'
'Private Sub Form_Load()
'Dim Lqtemp As String
'Dim Lqqry As QueryDef
'On Error Resume Next
'Set dbrpt = Lqws.OpenDatabase("D:\河南焦作\Report\Lqreport.mdb")
'dbrpt.QueryDefs.Delete "Lqnsql"
'dbrpt.TableDefs.Delete "Lqrpt"
'Lqtemp = "select [日期],[批次],[时间],[沥青]"
'LqdatPrimaryRS.RecordSource = Lqtemp + "from [Lqreport]" + Lqcxconcent + "order by [indexnumber] asc"
'Lqtemp = Lqtemp + " into Lqrpt from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Set Lqqry = dbrpt.CreateQueryDef("Lqnsql", Lqtemp)
'Lqqry.Execute
'Lqqry.Close
'Lqtemptime = Lqcxconcent
'End Sub
'
'Private Sub Lqcmdclose_Click()
'Screen.MousePointer = vbDefault
'Unload Me
'End Sub
'
'Private Sub Lqcmdrpt_Click()
'Dim Lqtemp As String
'Dim Lqqry As QueryDef
'On Error Resume Next
'Lqcxconcent = Lqtemptime
'Set dbrpt = Lqws.OpenDatabase("D:\河南焦作\Report\Lqreport.mdb")
'dbrpt.QueryDefs.Delete "Lqnsql"
'dbrpt.TableDefs.Delete "Lqrpt"
'Lqtemp = "select [日期],[批次],[时间],[沥青]"
'LqdatPrimaryRS.RecordSource = Lqtemp + "from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Lqtemp = Lqtemp + " into Lqrpt from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Set Lqqry = dbrpt.CreateQueryDef("Lqnsql", Lqtemp)
'Lqqry.Execute
'Lqqry.Close
'Lqcrystalrpt.ReportFileName = "D:\河南焦作\Report\lqreport.rpt"
'Lqcrystalrpt.DiscardSavedData = True
'Lqcrystalrpt.Action = 1
'End Sub
'
'Private Sub Lqcmdrrpt_Click()
'Dim Lqtemp As String
'Dim Lqqry As QueryDef
'On Error Resume Next
'Dim Lqtimestr As String
'Dim Lqtimeend As String
'Lqtimestr = InputBox("请输入起始时间(yyyy/mm/dd)", "起始时间")
' If Lqtimestr = "" Then
' Exit Sub
' Else
' Lqtimeend = InputBox("请输入终止时间(yyyy/mm/dd)", "终止时间")
' If Lqtimeend = "" Then
' Lqcxconcent = "where [日期]>=#" + Lqtimestr + "#" + " and ([时间] ='一班' or [时间] ='二班' or [时间] ='三班')"
' Lqrptfrm.Show
' Else
' Lqcxconcent = "where [日期]>=#" + Lqtimestr + "#" + " and [日期]<=#" + Lqtimeend + "#" + " and ([时间] ='一班' or [时间] ='二班' or [时间] ='三班')"
' End If
' End If
'
'Set dbrpt = Lqws.OpenDatabase("D:\河南焦作\Report\Lqreport.mdb")
'dbrpt.QueryDefs.Delete "Lqnsql"
'dbrpt.TableDefs.Delete "Lqrpt"
'Lqtemp = "select [日期],[批次],[时间],[沥青]"
'LqdatPrimaryRS.RecordSource = Lqtemp + "from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Lqtemp = Lqtemp + " into Lqrpt from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Set Lqqry = dbrpt.CreateQueryDef("Lqnsql", Lqtemp)
'Lqqry.Execute
'Lqqry.Close
'
'Lqcrystalrpt.ReportFileName = "D:\河南焦作\Report\lqrrpt.rpt"
'Lqcrystalrpt.DiscardSavedData = True
'Lqcrystalrpt.Action = 1
'
'End Sub
'
'Private Sub Lqcmdyrpt_Click()
'Dim Lqtemp As String
'Dim Lqqry As QueryDef
'Dim Lqtimestr As String
'Dim Lqtimeend As String
'Lqtimestr = InputBox("请输入时间(yyyy/mm)", "时间")
' If Lqtimestr = "" Then
' Exit Sub
' Else
' If Month(Lqtimestr) <> 12 Then
' Lqtimeend = Str(Year(Lqtimestr)) + "-" + Str(Month(Lqtimestr) + 1)
' Else
' Lqtimeend = Str(Year(Lqtimestr) + 1) + "-1"
' End If
' Lqcxconcent = "where [日期]>=#" + Lqtimestr + "#" + " and [日期]<#" + Lqtimeend + "#" + " and ([时间] ='一班' or [时间] ='二班' or [时间] ='三班')"
' End If
'
'Set dbrpt = Lqws.OpenDatabase("D:\河南焦作\Report\Lqreport.mdb")
'dbrpt.QueryDefs.Delete "Lqnsql"
'dbrpt.TableDefs.Delete "Lqrpt"
'Lqtemp = "select [日期],[批次],[时间],[沥青]"
'LqdatPrimaryRS.RecordSource = Lqtemp + "from [Lqreport]" + Lqcxconcent + "group by [日期] asc"
'Lqtemp = Lqtemp + " into Lqrpt from [Lqreport]" + Lqcxconcent + "order by [日期] asc"
'Set Lqqry = dbrpt.CreateQueryDef("Lqnsql", Lqtemp)
'Lqqry.Execute
'Lqqry.Close
'
'Lqcrystalrpt.ReportFileName = "D:\河南焦作\Report\lqyrpt.rpt"
'Lqcrystalrpt.DiscardSavedData = True
'Lqcrystalrpt.Action = 1
'End Sub
'
'Private Sub LqgrdDataGrid_AfterUpdate()
'Dim Lqtemp As Integer
'On Error Resume Next
'Set Lqrptdb = dbrpt.OpenRecordset("Lqreport", dbOpenDynaset)
'Lqrptdb.MoveLast
'Lqrptdb.MovePrevious
'Lqtemp = Lqrptdb(0)
'Lqrptdb.MoveNext
'Lqrptdb.Edit
'Lqrptdb(0) = Lqtemp + 1
'Lqrptdb.Update
'End Sub
'Private Sub LqdatPrimaryRS_Error(DataErr As Integer, Response As Integer)
' MsgBox "Data error event hit err:" & Error$(DataErr)
' Response = 0
'End Sub
'Private Sub LqdatPrimaryRS_Reposition()
' Screen.MousePointer = vbDefault
' On Error Resume Next
' LqdatPrimaryRS.Caption = "Record: " & (LqdatPrimaryRS.Recordset.AbsolutePosition + 1)
'End Sub
'Private Sub LqdatPrimaryRS_Validate(Action As Integer, Save As Integer)
' Select Case Action
' Case vbDataActionMoveFirst
' Case vbDataActionMovePrevious
' Case vbDataActionMoveNext
' Case vbDataActionMoveLast
' Case vbDataActionAddNew
' Case vbDataActionUpdate
' Case vbDataActionDelete
' Case vbDataActionFind
' Case vbDataActionBookmark
' Case vbDataActionClose
' Screen.MousePointer = vbDefault
' End Select
'End Sub
'Private Sub Form_Unload(Cancel As Integer)
' Screen.MousePointer = vbDefault
'End Sub
Option Explicit
Dim Lqtemptime As String, Lqtemp As String, lqprint As String
Private Sub cmdprt_Click()
If lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青日报表" Then
Lqcrystalrpt.ReportFileName = App.Path & "\Report\lqr.rpt"
Lqcrystalrpt.DiscardSavedData = True
Lqcrystalrpt.Action = 1
ElseIf lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青月报表" Then
Lqcrystalrpt.ReportFileName = App.Path & "\Report\lqy.rpt"
Lqcrystalrpt.DiscardSavedData = True
Lqcrystalrpt.Action = 1
ElseIf lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青年度报表" Then
Lqcrystalrpt.ReportFileName = App.Path & "\Report\lqn.rpt"
Lqcrystalrpt.DiscardSavedData = True
Lqcrystalrpt.Action = 1
ElseIf lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青历史累计数据报表" Then
Lqcrystalrpt.ReportFileName = App.Path & "\Report\lqhis.rpt"
Lqcrystalrpt.DiscardSavedData = True
Lqcrystalrpt.Action = 1
Else
Exit Sub
End If
End Sub
Private Sub Form_Load()
If tbl = 5 Then
dbrpt.Execute "delete from lqprt"
Lqtemp = "select * from Lqreport"
lqprint = "insert into lqprt " & Lqtemp & Lqcxconcent & " order by 时间 asc"
dbrpt.Execute lqprint
LqdatPrimaryRS.DatabaseName = App.Path & "\Report\report.mdb"
LqdatPrimaryRS.RecordsetType = 1
LqdatPrimaryRS.RecordSource = Lqtemp + Lqcxconcent + " order by 时间 asc"
lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青日报表"
tbl = 0
Lqcxconcent = ""
Exit Sub
ElseIf tbl = 6 Then
dbrpt.Execute "delete from lqprt"
Lqtemp = "select * from Lqreport"
lqprint = "insert into lqprt " & Lqtemp & Lqcxconcent & " order by 日期,批次,时间 asc"
dbrpt.Execute lqprint
LqdatPrimaryRS.DatabaseName = App.Path & "\Report\report.mdb"
LqdatPrimaryRS.RecordsetType = 1
LqdatPrimaryRS.RecordSource = Lqtemp + Lqcxconcent + " order by 日期,批次,时间 asc"
lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青月报表"
tbl = 0
Lqcxconcent = ""
Exit Sub
ElseIf tbl = 7 Then
dbrpt.Execute "delete from lqprt"
Lqtemp = "select * from Lqreport"
lqprint = "insert into lqprt " & Lqtemp & Lqcxconcent & " order by 日期,批次,时间 asc"
dbrpt.Execute lqprint
LqdatPrimaryRS.DatabaseName = App.Path & "\Report\report.mdb"
LqdatPrimaryRS.RecordsetType = 1
LqdatPrimaryRS.RecordSource = Lqtemp + Lqcxconcent + " order by 日期,批次,时间 asc"
lbllqbt.FontSize = 12
lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青历史累计数据报表"
tbl = 0
Lqcxconcent = ""
Exit Sub
ElseIf tbl = 8 Then
dbrpt.Execute "delete from lqprt"
Lqtemp = "select * from Lqreport"
lqprint = "insert into lqprt " & Lqtemp & Lqcxconcent & " order by 日期,批次,时间 asc"
dbrpt.Execute lqprint
LqdatPrimaryRS.DatabaseName = App.Path & "\Report\report.mdb"
LqdatPrimaryRS.RecordsetType = 1
LqdatPrimaryRS.RecordSource = Lqtemp + Lqcxconcent + " order by 日期,批次,时间 asc"
lbllqbt.FontSize = 14
lbllqbt.Caption = "焦作中州炭素有限公司自动配料系统沥青年度报表"
tbl = 0
Lqcxconcent = ""
Exit Sub
Else
tbl = 0
Lqcxconcent = ""
Unload Lqrptfrm
Exit Sub
End If
End Sub
Private Sub Lqcmdclose_Click()
Screen.MousePointer = vbDefault
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -