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

📄 frmtablereport.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Begin VB.Form frmTableReport 
   Caption         =   "列表查询"
   ClientHeight    =   5415
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8760
   LinkTopic       =   "Form2"
   MDIChild        =   -1  'True
   ScaleHeight     =   5500
   ScaleMode       =   0  'User
   ScaleWidth      =   8880
   Begin ComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8760
      _ExtentX        =   15452
      _ExtentY        =   741
      ButtonWidth     =   635
      ButtonHeight    =   582
      Appearance      =   1
      _Version        =   327682
      BorderStyle     =   1
      Begin VB.CommandButton cmdAccSet 
         Caption         =   "报表设置(&S)"
         Height          =   300
         Left            =   45
         TabIndex        =   5
         Top             =   45
         Width           =   1170
      End
      Begin VB.CommandButton cmdFormatSet 
         Caption         =   "显示格式(&F)"
         Height          =   300
         Left            =   1290
         TabIndex        =   4
         Top             =   45
         Width           =   1170
      End
      Begin VB.CommandButton cmdHide 
         Caption         =   "隐藏标题(&H)"
         Height          =   300
         Left            =   2460
         TabIndex        =   3
         Top             =   45
         Width           =   1170
      End
      Begin VB.CommandButton cmdSave 
         Caption         =   "报表保存(&M)"
         Height          =   300
         Left            =   3705
         TabIndex        =   2
         Top             =   45
         Width           =   1170
      End
      Begin VB.CommandButton cmdPrint 
         Caption         =   "打印(&P)"
         Height          =   300
         Left            =   4875
         TabIndex        =   1
         Top             =   45
         Width           =   1170
      End
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   3840
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   2580
      Visible         =   0   'False
      Width           =   1155
   End
   Begin VB.PictureBox picAccount 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   4815
      Left            =   60
      ScaleHeight     =   4785
      ScaleWidth      =   8565
      TabIndex        =   6
      Top             =   480
      Width           =   8595
      Begin MSFlexGridLib.MSFlexGrid msgAccount 
         Bindings        =   "frmTableReport.frx":0000
         Height          =   4335
         Left            =   180
         TabIndex        =   7
         Top             =   300
         Width           =   8175
         _ExtentX        =   14420
         _ExtentY        =   7646
         _Version        =   65541
         Rows            =   14
         Cols            =   14
         FixedCols       =   0
         BackColor       =   -2147483639
         ForeColor       =   -2147483630
         BackColorFixed  =   -2147483628
         ForeColorSel    =   -2147483643
         BackColorBkg    =   -2147483628
         GridLinesFixed  =   1
         AllowUserResizing=   1
         Appearance      =   0
      End
      Begin VB.Label LblTitle 
         AutoSize        =   -1  'True
         BackColor       =   &H80000014&
         Caption         =   "LblTitle"
         Height          =   180
         Left            =   3360
         TabIndex        =   8
         Top             =   60
         Width           =   720
      End
   End
   Begin VB.Label LblShadow 
      BackColor       =   &H80000010&
      Caption         =   "Label1"
      Height          =   4815
      Left            =   120
      TabIndex        =   9
      Top             =   540
      Width           =   8595
   End
End
Attribute VB_Name = "frmTableReport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'  列表报表窗体
'  作者:邓强
'  日期:1998.06.26
'
'  根据用户选择列表项目组织数据显示
'  ShowAcntBook        显示数据(类模块TableSet和Report模块调用)
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Const lngAccountTop As Long = 350                               '表体顶部位置
Const lngFormWidth As Long = 8500                               '窗体最小宽度
Const lngFormHeight As Long = 5370                              '窗体最小高度

Private WithEvents mclsMainControl As MainControl               '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private mblnHaveHead As Boolean                                 '是否需要标题
Private WithEvents mclsHook As Hook
Attribute mclsHook.VB_VarHelpID = -1
Private mOldCol As Integer
Private mclsTable As TableSet                                   '交叉表设置对象
Private mclsFormCond As FormCond
Private mintMastDealRow As Integer                              '已进行格式数据处理的最大行
Private mstrOtherCond As String                                 '附加条件


' 响应消息
Public Sub ResponseMessage()
    Dim vntMessage As Variant
    For Each vntMessage In mclsMainControl.Messages
        Select Case vntMessage
            '    单位                 部门                   科目                摘要
            Case Message.msgCustomer, Message.msgDepartment, Message.msgAccount, Message.msgRemark
                 RefreshData
            Case Else
        End Select
    Next
    mclsMainControl.Messages.Clear
End Sub
'显示报表
Public Sub ShowAcntBook(ByVal lngReportId As Long, ByVal ViewId As Long, Optional clsReportSet As TableSet = Nothing, _
        Optional clsFormCond As FormCond, Optional strOtherCond As String)
   
    mstrOtherCond = strOtherCond
    '显示已存盘的帐表
    If clsReportSet Is Nothing Then
        Set mclsTable = New TableSet
        Set mclsFormCond = New FormCond
        mclsFormCond.InitCondArr lngReportId, ViewId, 2
        mclsTable.GetReportSet (lngReportId)
    '显示才由向导生成的帐表
    Else
        Set mclsTable = clsReportSet
        Set mclsFormCond = clsFormCond
    End If
    
    Set mclsMainControl = gclsSys.MainControls.Add(Me)
    RefreshData
    
End Sub

Private Sub cmdAccSet_Click()
Dim blnIsOK As Boolean
    GetColWidth
    blnIsOK = mclsTable.ShowWizard(, mclsTable.ParentId, mclsTable.Level, mclsFormCond, False)
    If blnIsOK Then RefreshData
End Sub

'涮新数据
Private Sub RefreshData()
  Dim Strsql As String, strWhere As String
  Dim rstTemp As Recordset
    
    Strsql = mclsTable.GetSQLPre
    strWhere = mclsFormCond.GetCond
    If strWhere <> "" Then
        If mstrOtherCond <> "" Then strWhere = strWhere & " And " & mstrOtherCond
    Else
        If mstrOtherCond <> "" Then strWhere = mstrOtherCond
    End If
    If strWhere <> "" Then Strsql = Strsql & " WHERE " & strWhere
    Set rstTemp = gclsBase.BaseDB.OpenRecordset(Strsql, dbOpenSnapshot)
    Set Data1.Recordset = rstTemp
    If rstTemp.EOF Then msgAccount.AddItem ""
    Caption = "列表查询" & " - " & mclsTable.ReportName
    LblTitle.Caption = mclsTable.ReportName
    msgAccount.RowHeight(0) = 450
    ReSetColWidth
    mintMastDealRow = 1
    DealFormat                                   '处理数据格式
    LblTitle.Left = (msgAccount.Width - LblTitle.Width) \ 2
    rstTemp.Close
End Sub

Private Sub cmdFormatSet_Click()
    Dim blnIsOK As Boolean

⌨️ 快捷键说明

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