⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printassort.frm

📁 适合乡镇供电所使用电费处理系统v3 软件
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form PrintAssort 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "打印分类汇总"
   ClientHeight    =   5370
   ClientLeft      =   435
   ClientTop       =   1995
   ClientWidth     =   9240
   Icon            =   "PrintAssort.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5370
   ScaleWidth      =   9240
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.ListView ListView1 
      Height          =   5220
      Left            =   105
      TabIndex        =   5
      Top             =   90
      Width           =   7425
      _ExtentX        =   13097
      _ExtentY        =   9208
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      SmallIcons      =   "imlToolbarIcons"
      ColHdrIcons     =   "imlToolbarIcons"
      ForeColor       =   -2147483640
      BackColor       =   -2147483634
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   4
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "台区名称"
         Object.Width           =   3353
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Alignment       =   1
         SubItemIndex    =   1
         Text            =   "合计电量"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Alignment       =   1
         SubItemIndex    =   2
         Text            =   "合计电费"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Alignment       =   1
         SubItemIndex    =   3
         Text            =   "户数"
         Object.Width           =   2540
      EndProperty
   End
   Begin VB.Frame Frame1 
      Height          =   5295
      Left            =   7620
      TabIndex        =   0
      Top             =   15
      Width           =   1560
      Begin MSComctlLib.Toolbar Toolbar4 
         Height          =   780
         Left            =   135
         TabIndex        =   4
         Top             =   1575
         Width           =   1260
         _ExtentX        =   2223
         _ExtentY        =   1376
         ButtonWidth     =   2090
         ButtonHeight    =   1376
         Style           =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "生成电价报表"
               ImageIndex      =   4
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar3 
         Height          =   780
         Left            =   90
         TabIndex        =   3
         Top             =   315
         Width           =   1245
         _ExtentX        =   2196
         _ExtentY        =   1376
         ButtonWidth     =   2090
         ButtonHeight    =   1376
         Style           =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "生成台区月报"
               ImageIndex      =   3
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar2 
         Height          =   780
         Left            =   390
         TabIndex        =   2
         Top             =   3870
         Width           =   855
         _ExtentX        =   1508
         _ExtentY        =   1376
         ButtonWidth     =   1455
         ButtonHeight    =   1376
         Style           =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "关闭窗口"
               ImageIndex      =   2
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar1 
         Height          =   780
         Left            =   345
         TabIndex        =   1
         Top             =   2640
         Width           =   885
         _ExtentX        =   1561
         _ExtentY        =   1376
         ButtonWidth     =   1455
         ButtonHeight    =   1376
         Style           =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "打印报表"
               ImageIndex      =   1
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   285
         Top             =   4785
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   4
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintAssort.frx":030A
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintAssort.frx":0626
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintAssort.frx":0A7A
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintAssort.frx":0ED2
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin MSComctlLib.ImageList imlToolbarIcons 
      Left            =   3885
      Top             =   4905
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "PrintAssort.frx":132A
            Key             =   "Macro"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "PrintAssort"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    OpenMdb
    If Len(UserSeek) = 0 Then
       GzYue = Format(Month(Date), "0#")
       Call sTruInfo
    End If
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
        MsgBox "打印机未联机!", vbCritical + vbAbortRetryIgnore, Me.Caption
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
     Unload Me
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)
    Set MdbR = NdMd.OpenRecordset("SELECT 用户电费.镇村名称,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数 From 用户电费 GROUP BY 用户电费.镇村名称")
    Dim intCounter, intRecCount As Integer
    Dim itm As ListItem
    Dim Dlhj As Long, Dfhj As Long, Yhhj As Long
    ListView1.ListItems.Clear
    ListView1.SortKey = 0
    Dlhj = 0
    Dfhj = 0
    Yhhj = 0
    ListView1.SortOrder = lvwAscending
    If Not MdbR.eof Then
       MdbR.MoveLast
       intRecCount = MdbR.RecordCount
       MdbR.MoveFirst
       For intCounter = 0 To MdbR.RecordCount - 1
           Dlhj = Dlhj + MdbR!总电量
           Dfhj = Dfhj + Format(MdbR!总电费, "0.00")
           Yhhj = Yhhj + MdbR!用户数
           Set itm = ListView1.ListItems.Add(, , CStr(MdbR!镇村名称), , 1)
           itm.SubItems(1) = MdbR!总电量
           itm.SubItems(2) = Format(MdbR!总电费, "0.00")
           itm.SubItems(3) = MdbR!用户数
           MdbR.MoveNext
           DoEvents
       Next intCounter
       Set itm = ListView1.ListItems.Add(, , "合计:")
       itm.SubItems(1) = Dlhj
       itm.SubItems(2) = Format(Dfhj, "0.00")
       itm.SubItems(3) = Yhhj
       'ListView1.Sorted = True
    End If
End Sub

Private Sub Toolbar4_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error Resume Next
    Set MdbR = NdMd.OpenRecordset("SELECT 用户电费.电价类别,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数 From 用户电费 GROUP BY 用户电费.电价类别")
    Dim intCounter, intRecCount As Integer
    Dim itm As ListItem
    Dim Dlhj As Long, Dfhj As Long, Yhhj As Long
    ListView1.ListItems.Clear
    ListView1.SortKey = 0
    Dlhj = 0
    Dfhj = 0
    Yhhj = 0
    ListView1.SortOrder = lvwAscending
    If Not MdbR.eof Then
       MdbR.MoveLast
       intRecCount = MdbR.RecordCount
       MdbR.MoveFirst
       For intCounter = 0 To MdbR.RecordCount - 1
           Dlhj = Dlhj + MdbR!总电量
           Dfhj = Dfhj + Format(MdbR!总电费, "0.00")
           Yhhj = Yhhj + MdbR!用户数
           Set itm = ListView1.ListItems.Add(, , CStr(MdbR!电价类别), , 1)
           itm.SubItems(1) = MdbR!总电量
           itm.SubItems(2) = Format(MdbR!总电费, "0.00")
           itm.SubItems(3) = MdbR!用户数
           MdbR.MoveNext
           DoEvents
       Next intCounter
       Set itm = ListView1.ListItems.Add(, , "合计:")
       itm.SubItems(1) = Dlhj
       itm.SubItems(2) = Format(Dfhj, "0.00")
       itm.SubItems(3) = Yhhj
    '   ListView1.Sorted = True
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -