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

📄 frmmultiaccountbook.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 5 页
字号:
              End If
              If intCount > mintDebit + mintCredit + 1 And intCount <= mintDebit + mintCredit + 1 + mintBanlance Then
                  mSubColDesc(intCount) = mBanlanceDesc(intCount - (mintDebit + mintCredit + 1))
                  mSubColCombine(intCount) = "余额"
              End If
              If intCount > mintDebit + mintCredit + 1 + mintBanlance And intCount <= mintDebit + mintCredit + 1 + mintBanlance + mintOther Then
                  mSubColDesc(intCount) = mOtherDesc(intCount - (mintDebit + mintCredit + 1 + mintBanlance))
                  Select Case mclsMultiReportSet.ExpandStyle
                     Case 1
                       mSubColCombine(intCount) = "借方余额分析"
                     Case 2
                       mSubColCombine(intCount) = "贷方余额分析"
                     Case 8
                       mSubColCombine(intCount) = "借方分析"
                     Case 32
                       mSubColCombine(intCount) = "贷方分析"
                  End Select
              End If
        Next intCount
    End If
    
    If intExpandStyle = 4 Then
        ReDim mSubColDesc(mintTotal + mintDebit + mintCredit + 1 + mintBanlance)
        ReDim mSubColCombine(mintTotal + mintDebit + mintCredit + 1 + mintBanlance)
        For intCount = 1 To mintTotal + mintDebit + mintCredit + 1 + mintBanlance
              If intCount <= mintTotal Then
                  mSubColDesc(intCount) = mTotalDesc(intCount)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintTotal And intCount <= mintTotal + mintDebit Then
                  mSubColDesc(intCount) = mDebitDesc(intCount - mintTotal)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintTotal + mintDebit And intCount <= mintTotal + mintDebit + mintCredit Then
                  mSubColDesc(intCount) = mCreditDesc(intCount - mintTotal - mintDebit)
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount = mintTotal + mintDebit + mintCredit + 1 Then
                  mSubColDesc(intCount) = "借/货"
                  mSubColCombine(intCount) = ""
                  mintDirectCol = mintTotal + mintDebit + mintCredit + 1
              End If
              If intCount > mintTotal + mintDebit + mintCredit + 1 And intCount <= mintTotal + mintDebit + mintCredit + 1 + mintBanlance Then
                  mSubColDesc(intCount) = mBanlanceDesc(intCount - (mintTotal + mintDebit + mintCredit + 1))
                  mSubColCombine(intCount) = "余额"
              End If
        Next intCount
    End If
    
    If intExpandStyle = 16 Then
        ReDim mSubColDesc(mintDebit + mintTotal + mintCredit + 1 + mintBanlance)
        ReDim mSubColCombine(mintDebit + mintTotal + mintCredit + 1 + mintBanlance)
        For intCount = 1 To mintDebit + mintTotal + mintCredit + 1 + mintBanlance
              If intCount <= mintDebit Then
                  mSubColDesc(intCount) = mDebitDesc(intCount)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintDebit And intCount <= mintDebit + mintTotal Then
                  mSubColDesc(intCount) = mTotalDesc(intCount - mintDebit)
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount > mintDebit + mintTotal And intCount <= mintDebit + mintTotal + mintCredit Then
                  mSubColDesc(intCount) = mCreditDesc(intCount - mintTotal - mintDebit)
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount = mintTotal + mintDebit + mintCredit + 1 Then
                  mSubColDesc(intCount) = "借/货"
                  mSubColCombine(intCount) = ""
                  mintDirectCol = mintTotal + mintDebit + mintCredit + 1
              End If
              If intCount > mintTotal + mintDebit + mintCredit + 1 And intCount <= mintTotal + mintDebit + mintCredit + 1 + mintBanlance Then
                  mSubColDesc(intCount) = mBanlanceDesc(intCount - (mintTotal + mintDebit + mintCredit + 1))
                  mSubColCombine(intCount) = "余额"
              End If
        Next intCount
    End If
    
    If intExpandStyle = 20 Then
        ReDim mSubColDesc(mintTotal + mintDebit + mintTotal2 + mintCredit + 1 + mintBanlance)
        ReDim mSubColCombine(mintTotal + mintDebit + mintTotal2 + mintCredit + 1 + mintBanlance)
        For intCount = 1 To mintTotal + mintDebit + mintTotal2 + mintCredit + 1 + mintBanlance
              If intCount <= mintTotal Then
                  mSubColDesc(intCount) = mTotalDesc(intCount)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintTotal And intCount <= mintTotal + mintDebit Then
                  mSubColDesc(intCount) = mDebitDesc(intCount - mintTotal)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintTotal + mintDebit And intCount <= mintTotal + mintDebit + mintTotal2 Then
                  mSubColDesc(intCount) = mTotalDesc2(intCount - (mintTotal + mintDebit))
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount > mintTotal + mintDebit + mintTotal2 And intCount <= mintTotal + mintDebit + mintTotal2 + mintCredit Then
                  mSubColDesc(intCount) = mCreditDesc(intCount - (mintTotal + mintDebit + mintTotal2))
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount = mintTotal + mintDebit + mintTotal2 + mintCredit + 1 Then
                  mSubColDesc(intCount) = "借/货"
                  mSubColCombine(intCount) = ""
                  mintDirectCol = mintTotal + mintDebit + mintTotal2 + mintCredit + 1
              End If
              If intCount > mintTotal + mintDebit + mintTotal2 + mintCredit + 1 And intCount <= mintTotal + mintDebit + mintTotal2 + mintCredit + 1 + mintBanlance Then
                  mSubColDesc(intCount) = mBanlanceDesc(intCount - (mintTotal + mintDebit + mintTotal2 + mintCredit + 1))
                  mSubColCombine(intCount) = "余额"
              End If
        Next intCount
    End If

    If intExpandStyle = 40 Then
        ReDim mSubColDesc(mintDebit + mintCredit + 1 + mintBanlance + mintOther + mintOther2)
        ReDim mSubColCombine(mintDebit + mintCredit + 1 + mintBanlance + mintOther + mintOther2)
        For intCount = 1 To mintDebit + mintCredit + 1 + mintBanlance + mintOther + mintOther2
              If intCount <= mintDebit Then
                  mSubColDesc(intCount) = mDebitDesc(intCount)
                  mSubColCombine(intCount) = "借方"
              End If
              If intCount > mintDebit And intCount <= mintDebit + mintCredit Then
                  mSubColDesc(intCount) = mCreditDesc(intCount - mintDebit)
                  mSubColCombine(intCount) = "贷方"
              End If
              If intCount = mintDebit + mintCredit + 1 Then
                  mSubColDesc(intCount) = "借/货"
                  mSubColCombine(intCount) = ""
                  mintDirectCol = mintDebit + mintCredit + 1
              End If
              If intCount > mintDebit + mintCredit + 1 And intCount <= mintDebit + mintCredit + 1 + mintBanlance Then
                  mSubColDesc(intCount) = mBanlanceDesc(intCount - (mintDebit + mintCredit + 1))
                  mSubColCombine(intCount) = "余额"
              End If
              If intCount > mintDebit + mintCredit + 1 + mintBanlance And intCount <= mintDebit + mintCredit + 1 + mintBanlance + mintOther Then
                  mSubColDesc(intCount) = mOtherDesc(intCount - (mintDebit + mintCredit + 1 + mintBanlance))
                  mSubColCombine(intCount) = "借方分析"
              End If
              If intCount > mintDebit + mintCredit + 1 + mintBanlance + mintOther And intCount <= mintDebit + mintCredit + 1 + mintBanlance + mintOther + mintOther2 Then
                  mSubColDesc(intCount) = mOtherDesc2(intCount - (mintDebit + mintCredit + 1 + mintBanlance + mintOther))
                  mSubColCombine(intCount) = "贷方分析"
              End If
        Next intCount
    End If
    If mintDirectCol > 0 Then
       mlngMultiWid(mintDirectCol) = 300
    End If
    mintDirectCol = mintDirectCol + mclsMultiReportSet.Columns - 1
End Sub

'设置表头
Private Sub InitGridTitle()
  Dim intCount As Integer, intIndex As Integer
  Dim intCol As Integer
  Dim blnCombine As Boolean, blnTwoLine As Boolean, blnCash As Boolean, blnIsNum As Boolean
  Dim intYear As Integer, intYear2 As Integer
  Dim strColName As String, strCombine As String
  Dim lngWidth As Long
  Dim lngTop As Long, lngLeft As Long, lngHeight As Long
  Dim lngDateWid As Long
    
    On Error Resume Next
    Caption = mclsMultiReportSet.ReportName

    mintRemarkCol = -1
    mintAmountBanCol = -1
    mintQuantityBanCol = -1
    mintCurrencyBanCol = -1
    
    If mclsMultiReportSet.GridTop > 0 Then
        If mclsMultiReportSet.PaperID <> 0 Then
           mclsMultiReportSet.GetGridTop
           ABook.GridTop = mclsMultiReportSet.GridTop
        Else
           ABook.GridTop = mclsMultiReportSet.GridTop
        End If
    End If
    
    On Error Resume Next
    
    intYear = Year(detBegin.Text)
    If (mclsMultiReportSet.PaperID = 5 Or mclsMultiReportSet.PaperID = 14 Or mclsMultiReportSet.PaperID = 16) And mintSub = 2 Then
       lngWidth = 0
    Else
       lngWidth = mclsMultiReportSet.ColumnWidth(2)
    End If
    If intYear = 0 Then
       SetBookField 0, mclsMultiReportSet.ColumnDesc(2), gclsBase.AccountYear & "年", 255, lngWidth / Screen.TwipsPerPixelX, True, False, , True
    Else
       SetBookField 0, mclsMultiReportSet.ColumnDesc(2), intYear & "年", 255, lngWidth / Screen.TwipsPerPixelX, True, False, , True
    End If
    If mclsMultiReportSet.OnlyData Then
        If mblnPrint Then
           ABook.FCText(mintDateIndex, 0) = intYear
        Else
           ABook.FCText(mintDateIndex, 0) = intYear & "年"
        End If
        ABook.FCText(mintDateIndex, 1) = ""
        GetYearPos mclsMultiReportSet.PaperID, lngTop, lngLeft, lngDateWid, lngHeight
        ABook.FCTop(mintDateIndex) = lngTop / Screen.TwipsPerPixelY
        ABook.FCLeft(mintDateIndex) = lngLeft / Screen.TwipsPerPixelX
        ABook.FCWidth(mintDateIndex) = lngDateWid / Screen.TwipsPerPixelX
        ABook.FCHeight(mintDateIndex) = lngHeight / Screen.TwipsPerPixelY
    End If
    
    If (mclsMultiReportSet.PaperID = 5 Or mclsMultiReportSet.PaperID = 14 Or mclsMultiReportSet.PaperID = 16) And mintSub = 2 Then
       SetBookField 1, mclsMultiReportSet.ColumnDesc(3), , , 0 / Screen.TwipsPerPixelX, , , , True
    Else
       SetBookField 1, mclsMultiReportSet.ColumnDesc(3), , , mclsMultiReportSet.ColumnWidth(3) / Screen.TwipsPerPixelX, , , , True
    End If
    
    intCol = 0
    
    intCount = 1
    intIndex = 1
    
    Do While intCount <= mclsMultiReportSet.Columns
        If mintSub = 0 Then
           mintSub = 1
        End If
        
        If intIndex > mclsMultiReportSet.Columns Then
           Exit Do
        End If
        blnIsNum = False
        strColName = mclsMultiReportSet.ColumnDesc(intIndex)
        strCombine = mclsMultiReportSet.ColumnCombine(intIndex)
        If strColName = "附单数" Then
           blnIsNum = True
        End If
        '** IF 1 **
        If (mintSub = 1 And intCount <= mintMastDealCol(1)) Or _
           (mintSub > 1 And ((intCount < mclsMultiReportSet.FixColumns) Or _
           (mintSub > 1 And (intIndex - 1 > mintMastDealCol(mintSub - 1) And intCount - 1 < mintMastDealCol(mintSub))))) Then
           If strColName <> "年" Then
               If intIndex > 3 Then
                   blnCombine = True
                   If strCombine = "" Then
                       blnCombine = False
                   Else
                       If intIndex < mclsMultiReportSet.Columns Then
                          If Not (strCombine <> "" And _
                            (mclsMultiReportSet.ColumnCombine(intIndex + 1) = strCombine Or _
                             mclsMultiReportSet.ColumnCombine(intIndex - 1) = strCombine)) Then
                              blnCombine = False
                          End If
                       Else
                          If (mclsMultiReportSet.ColumnCombine(intIndex - 1) = "") Or Not _
                          (mclsMultiReportSet.ColumnCombine(intIndex - 1) <> "" And mclsMultiReportSet.ColumnCombine(intIndex - 1) = _
                           strCombine) Then
                              blnCombine = False
                          End If
                       End If
                   End If
                   
                   If intIndex = mclsMultiReportSet.Columns Then
                        blnTwoLine = True
                   Else
                        If (mclsMultiReportSet.ColumnCombine(intIndex + 1) <> strCombine) _
                        Or ColIsCash(mclsMultiReportSet.ColumnDesc(intIndex + 1)) Then
                            blnTwoLine = True
                        Else
                            blnTwoLine = False
                        End If
                   End If
                   If (mclsMultiReportSet.PaperID = 5 Or mclsMultiReportSet.PaperID = 14 Or mclsMultiReportSet.PaperID = 16) And mintSub = 2 Then
                       lngWidth = 0
                   Else
                       lngWidth = mclsMultiReportSet.ColumnWidth(intIndex)
                   End If
                   If Not blnCombine Then
                       blnCash = ColIsCash(strColName)
                       SetBookField intCol, strColName, , , lngWidth / Screen.TwipsPerPixelX, , blnTwoLine, blnCash, blnIsNum
                   Else
                       blnCash = ColIsCash(strColName)
                       If blnCash Then
                          blnTwoLine = blnCash
                       End If
                       If intIndex < mclsMultiReportSet.Columns Then
                          If mclsMultiReportSet.ColumnCombine(intIndex + 1) = strCombine Then
                             SetBookField intCol, strReplace(strColName, strCombine, ""), strCombine, , lngWidth / Screen.TwipsPerPixelX, True, blnTwoLine, True, blnIsNum
                          Else
                             SetBookField intCol, strReplace(strColName, strCombine, ""), , , lngWidth / Screen.TwipsPerPixelX, , blnTwoLine, blnCash, blnIsNum
                          End If
                       Else
                          SetBookField intCol, strReplace(strColName, strCombine, ""), , , lngWidth / Screen.TwipsPerPixelX, , blnTwoLine, blnCash, blnIsNum
                       End If
                   End If
               End If
    
               If strColName = "月" Then
                   mintMonthCol = intCol + 1
               End If
               If strColName = "日" Then
                   mintDayCol = intCol + 1
               End If
               If strColName = "摘要" Then
                   mintRemarkCol = intCol + 1
               End If
               If strColName = "借/货" Then
                   mintDirectCol = intCol + 1
               End If
               intCol = intCol + 1
               intCount = intCount + 1
           End If
        Else
           'Exit Do
        '** END OF IF 1 **
        End If
        intIndex = intIndex + 1
    Loop
    
    '** IF 有分析栏目 **
    If Not Utility.ArrIsEmpty(mSubColCombine) Then
    If Not (UBound(mSubColCombine) = 1 And mSubColCombine(1) = "") Then
        For intCount = mclsMultiReportSet.Columns - 1 To mintMastDealCol(UBound(mintMastDealCol))
            If mSubColCombine(intCount - (mclsMultiReportSet.Columns - 1)) = "余额" Then
                 If InStr(1, mSubColDesc(intCount - (mclsMultiReportSet.Columns - 1)), "金额") > 0 Or _
                    InStr(1, mSubColDesc(intCount - (mclsMultiReportSet.Columns - 1)), "本币") > 0 Then
                     mintAmountBanCol = intCount
                 End If
                 If InStr(1, mSubColDesc(intCount - (mclsMultiReportSet.Columns - 1)), "数量") > 0 Then
                     mintQuantityBanCol = intCount
                 End If
                 If InStr(1, mSubColDesc(intCount - (mclsMultiReportSet.Columns - 1)), "原币") > 0 Then
                     mintCurrencyBanCol = intCount
                 End If
            End If
        Next intCount
        '** IF 2 **(本页包含子栏目)
        If mintMastDealCol(mintSub) >= mclsMultiReportSet.Columns Then
        '从本页第一个子栏目开始
        For intCount = IIf(mintMastDealCol(mintSub - 1) > mclsMultiReportSet.Columns, mintMastDealCol(mintSub - 1) + 1, mclsMultiReportSet.Columns) To mintMastDealCol(mintSub)

⌨️ 快捷键说明

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