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

📄 banreport.cls

📁 金算盘软件代码
💻 CLS
📖 第 1 页 / 共 4 页
字号:
    ColumnTop = mvarColumnTop(ColumnIndex)
End Property

'栏目Left
Public Property Let ColumnLeft(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarColumnLeft(ColumnIndex) = vData
End Property

Public Property Get ColumnLeft(ByVal ColumnIndex As Integer) As Long
    ColumnLeft = mvarColumnLeft(ColumnIndex)
End Property

'栏目高度
Public Property Let ColumnHeight(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarColumnHeight(ColumnIndex) = vData
End Property

Public Property Get ColumnHeight(ByVal ColumnIndex As Integer) As Long
    ColumnHeight = mvarColumnHeight(ColumnIndex)
End Property

'栏目宽度
Public Property Let ColumnWidth(ByVal ColumnIndex As Integer, ByVal vData As Long)
    On Error Resume Next
    mvarColumnWidth(ColumnIndex) = vData
End Property

Public Property Get ColumnWidth(ByVal ColumnIndex As Integer) As Long
    ColumnWidth = mvarColumnWidth(ColumnIndex)
End Property

'查询条件Top
Public Property Let CondTop(ByVal vData As Long)
    mlngCondTop = vData
End Property

Public Property Get CondTop() As Long
    CondTop = mlngCondTop
End Property

'查询条件Left
Public Property Let CondLeft(ByVal vData As Long)
    mlngCondLeft = vData
End Property

Public Property Get CondLeft() As Long
    CondLeft = mlngCondLeft
End Property

'查询条件高度
Public Property Let CondHeight(ByVal vData As Long)
    mlngCondHeight = vData
End Property

Public Property Get CondHeight() As Long
    CondHeight = mlngCondHeight
End Property

'查询条件宽度
Public Property Let CondWidth(ByVal vData As Long)
    mlngCondWidth = vData
End Property

Public Property Get CondWidth() As Long
    CondWidth = mlngCondWidth
End Property

'查询条件对齐方式
Public Property Let CondAlign(ByVal vData As Long)
    mlngCondAlign = vData
End Property

Public Property Get CondAlign() As Long
    CondAlign = mlngCondAlign
End Property

'查询条件显示方式
Public Property Let CondShow(ByVal vData As Byte)
    mbytCondShow = vData
End Property

Public Property Get CondShow() As Byte
    CondShow = mbytCondShow
End Property

'表头栏目Top
Public Property Let HeadTop(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarHeadTop(ColumnIndex) = vData
End Property

Public Property Get HeadTop(ByVal ColumnIndex As Integer) As Long
    HeadTop = mvarHeadTop(ColumnIndex)
End Property

'表头栏目Left
Public Property Let HeadLeft(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarHeadLeft(ColumnIndex) = vData
End Property

Public Property Get HeadLeft(ByVal ColumnIndex As Integer) As Long
    HeadLeft = mvarHeadLeft(ColumnIndex)
End Property

'表头栏目高度
Public Property Let HeadHeight(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarHeadHeight(ColumnIndex) = vData
End Property

Public Property Get HeadHeight(ByVal ColumnIndex As Integer) As Long
    HeadHeight = mvarHeadHeight(ColumnIndex)
End Property

'表头栏目类型
Public Property Let HeadType(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarHeadType(ColumnIndex) = vData
End Property

Public Property Get HeadType(ByVal ColumnIndex As Integer) As Long
    HeadType = mvarHeadType(ColumnIndex)
End Property

'表头栏目宽度
Public Property Let HeadWidth(ByVal ColumnIndex As Integer, ByVal vData As Long)
    mvarHeadWidth(ColumnIndex) = vData
End Property

Public Property Get HeadWidth(ByVal ColumnIndex As Integer) As Long
    HeadWidth = mvarHeadWidth(ColumnIndex)
End Property

'栏目合并列名
Public Property Let ColumnCombine(ByVal ColumnIndex As Integer, ByVal vData As String)
    mvarColumnCombine(ColumnIndex) = vData
End Property

Public Property Get ColumnCombine(ByVal ColumnIndex As Integer) As String
    ColumnCombine = mvarColumnCombine(ColumnIndex)
End Property

'栏目数
Public Property Let Columns(ByVal vData As Integer)
    mvarColumns = vData
    
    ReDim Preserve mvarColumnTop(mvarColumns)
    ReDim Preserve mvarColumnLeft(mvarColumns)
    ReDim Preserve mvarColumnHeight(mvarColumns)
    ReDim Preserve mvarColumnWidth(mvarColumns)
    
    ReDim Preserve mvarColumnOrderType(mvarColumns)
    ReDim Preserve mvarColumnIsFix(mvarColumns)
    ReDim Preserve mvarColumnIsMust(mvarColumns)
    ReDim Preserve mvarColumnIsFind(mvarColumns)
    ReDim Preserve mblnColumnMayChoose(mvarColumns)
    ReDim Preserve mvarColumnFieldID(mvarColumns)
    ReDim Preserve mvarColumnFieldName(mvarColumns)
    ReDim Preserve mvarColumnDesc(mvarColumns)
    ReDim Preserve mstrColumnGroup(mvarColumns)
    ReDim Preserve mvarColumnFieldType(mvarColumns)
    ReDim Preserve mvarColumnFieldSize(mvarColumns)
    ReDim Preserve mvarColumnCombine(mvarColumns)
End Property

Public Property Get Columns() As Integer
    Columns = mvarColumns
End Property

'固定栏目数
Public Property Let FixColumns(ByVal vData As Integer)
    mvarFixColumns = vData
End Property

Public Property Get FixColumns() As Integer
    FixColumns = mvarFixColumns
End Property

'取 FROM 子句
Public Property Get FromOfSql() As String
    
    Select Case mvarViewID
       
       '凭证汇总表
       Case 680
         
         FromOfSql = " From Voucher,VoucherDetail,Account,Currencys,Customer,CustomerType,Department,Employee," & _
                     "EmployeeType,AccountType,Department Department1,Employee Employee1,Area Area2," & _
                     "Class1,VoucherType,Operator MakeMan,Operator VerifyMan,Operator RecordMan,Class2"
         
       
       '科目汇总表
       Case 632
         FromOfSql = " From Account,AccountDaily,Currencys,Customer,CustomerType,Department,Employee,EmployeeType," & _
                     "AccountType,Department Department1,Employee Employee1,Area Area2,Class1,Class2"
         
       '科目余额表
       Case 636, 662
         FromOfSql = " From Account,AccountDaily,Currencys,Customer,CustomerType,Department,Employee," & _
                      "EmployeeType,AccountType,Department Department1,Employee Employee1,Area Area2,Class1,Class2"
       '应收余额表
       Case 638
         FromOfSql = " From AccountDaily,Account,Currencys,Customer,CustomerType,Department,Employee,EmployeeType," & _
                     "AccountType,Department Department1,Employee Employee1,Area Area2,Class1,Class2"
         
                     
       '应付余额表
       Case 639
         FromOfSql = " From AccountDaily,Account,Currencys,Customer,CustomerType,Department,Employee,EmployeeType," & _
                     "AccountType,Department Department1,Employee Employee1,Area Area2,Class1,Class2"
         
       Case Else
         FromOfSql = mvarFrom
    End Select
End Property

'取 SELECT 子句
Public Property Get SelectOfSql() As String
    SelectOfSql = mvarSelect
End Property

'报表对应的视图ID
Public Property Let ViewId(ByVal vData As Long)
  Dim rstView As rdoResultset
  Dim strSql As String
  
    If vData = 638 Or vData = 639 Then
       If gclsBase.ControlAccount Then
          strSql = "Update ViewField Set blnIsFilter=0 Where strViewFieldDesc='凭证限制' And lngViewID=" & vData
          gclsBase.BaseDB.Execute strSql
       End If
    End If
    mvarViewID = vData
    Set rstView = gclsBase.BaseDB.OpenResultset("Select strViewName,strViewSQL,blnIsUnion from View1 Where lngViewId=" & mvarViewID, rdOpenStatic)
    If Not rstView.EOF Then
        mvarViewName = rstView!strViewName
        If rstView!blnIsUnion Then
           mvarFrom = " From " & GetNoXString(rstView!strViewSQL, 1, "|") & "| From " & GetNoXString(rstView!strViewSQL, 2, "|")
        Else
           mvarFrom = " From " & rstView!strViewSQL
        End If
    End If
End Property

Public Property Get ViewId() As Long
    ViewId = mvarViewID
End Property

'报表ID
Public Property Let ReportID(ByVal vData As Long)
  Dim rstReport As rdoResultset
    mvarReportID = vData
    Set rstReport = gclsBase.BaseDB.OpenResultset("Select lngPaperID,lngPrintSetupID,bytGroup,strReportName,bytAccountType,bytPrep,intLevel,lngParentID from Report Where lngReportId=" & mvarReportID, rdOpenStatic)
    If Not rstReport.EOF Then
        mvarReportName = rstReport!strReportName
        mbytPrep = rstReport!bytPrep
        mbytGroup = rstReport!bytGroup
        mlngPrintSetID = rstReport!lngPrintSetupID
        If mlngParentID = 0 Then
            mlngParentID = rstReport!lngParentId
            mintParentLevel = rstReport!intLevel
        End If
        mlngPaperID = IIf(IsNull(rstReport!lngPaperID), 0, rstReport!lngPaperID)
    End If
End Property

Public Property Get ReportID() As Long
    ReportID = mvarReportID
End Property

'报表名称
Public Property Let ReportName(ByVal vData As String)
    mvarReportName = vData
End Property

Public Property Get ReportName() As String
    ReportName = mvarReportName
End Property

'报表对应的视图名称
Public Property Get ViewName() As String
    ViewName = mvarViewName
End Property

'''''''''''''''''''''''''''''''''''''''''''''''''''
'                报表设置类方法
'
'''''''''''''''''''''''''''''''''''''''''''''''''''

'按用户ID重新保存一份报表
Private Sub AddReport()
  Dim rstReport As rdoResultset
  Dim strSql As String
  Dim lngReportID As Long
  Dim clsFormat As ClsFormatset

    '关闭表触发器
    strSql = "Alter Table Report Disable All Triggers"
    gclsBase.BaseDB.Execute (strSql)
    
    'Add List
    strSql = "Select * from Report"
    Set rstReport = gclsBase.BaseDB.OpenResultset(strSql, rdOpenDynamic, rdConcurValues)
    With rstReport
       .AddNew
          lngReportID = BillPublic.GetNewID("Report")
          !lngViewId = mvarViewID
          !strReportName = mvarReportName
          !lngOperatorID = gclsBase.OperatorID
          !bytPrep = 2
          !bytWizard = 9
          !lngParentId = mlngParentID
          !intLevel = mintParentLevel + 1
          !blnIsDetail = 1
          !bytGroup = mbytGroup

⌨️ 快捷键说明

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