上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:63k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Begin VB.Form ZF_Gys_FrmKmyebjg 
  5.    Caption         =   "科目发生额及余额表"
  6.    ClientHeight    =   7755
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11400
  10.    HelpContextID   =   5001
  11.    Icon            =   "辅助_供应商往来_科目余额表查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   7755
  16.    ScaleWidth      =   11400
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.Timer Timer1 
  19.       Enabled         =   0   'False
  20.       Interval        =   1
  21.       Left            =   7620
  22.       Top             =   90
  23.    End
  24.    Begin VB.PictureBox Pic_Title 
  25.       Height          =   1185
  26.       Left            =   0
  27.       Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":1042
  28.       ScaleHeight     =   1125
  29.       ScaleWidth      =   11715
  30.       TabIndex        =   1
  31.       Top             =   570
  32.       Width           =   11775
  33.       Begin VB.ComboBox Combo_FzPxfs 
  34.          Height          =   300
  35.          Left            =   10740
  36.          Style           =   2  'Dropdown List
  37.          TabIndex        =   14
  38.          Top             =   780
  39.          Width           =   945
  40.       End
  41.       Begin VB.ComboBox Combo_AccFormat 
  42.          Height          =   300
  43.          Left            =   7980
  44.          Style           =   2  'Dropdown List
  45.          TabIndex        =   6
  46.          Top             =   780
  47.          Width           =   1725
  48.       End
  49.       Begin MSComctlLib.ImageCombo Imgebo_FzCcode 
  50.          Height          =   315
  51.          Left            =   1320
  52.          TabIndex        =   11
  53.          Top             =   780
  54.          Width           =   3225
  55.          _ExtentX        =   5689
  56.          _ExtentY        =   556
  57.          _Version        =   393216
  58.          ForeColor       =   -2147483640
  59.          BackColor       =   -2147483643
  60.          Locked          =   -1  'True
  61.       End
  62.       Begin VB.Label TsLabel 
  63.          AutoSize        =   -1  'True
  64.          BackStyle       =   0  'Transparent
  65.          Caption         =   "排序方式:"
  66.          Height          =   180
  67.          Index           =   0
  68.          Left            =   9900
  69.          TabIndex        =   15
  70.          Top             =   840
  71.          Width           =   810
  72.       End
  73.       Begin VB.Label Lab_TitleMess 
  74.          BackStyle       =   0  'Transparent
  75.          Caption         =   "外币名称:"
  76.          Height          =   225
  77.          Index           =   2
  78.          Left            =   4470
  79.          TabIndex        =   13
  80.          Top             =   270
  81.          Visible         =   0   'False
  82.          Width           =   915
  83.       End
  84.       Begin VB.Label Lab_TitleText 
  85.          BackStyle       =   0  'Transparent
  86.          ForeColor       =   &H00000000&
  87.          Height          =   225
  88.          Index           =   1
  89.          Left            =   5430
  90.          TabIndex        =   12
  91.          Top             =   270
  92.          Width           =   1395
  93.       End
  94.       Begin VB.Label Lab_TitleMess 
  95.          AutoSize        =   -1  'True
  96.          BackStyle       =   0  'Transparent
  97.          Caption         =   "科目名称:"
  98.          Height          =   180
  99.          Index           =   1
  100.          Left            =   450
  101.          TabIndex        =   10
  102.          Top             =   840
  103.          Width           =   810
  104.       End
  105.       Begin VB.Label Lab_CountInfo 
  106.          BackStyle       =   0  'Transparent
  107.          Caption         =   "正在处理"
  108.          Height          =   225
  109.          Left            =   7050
  110.          TabIndex        =   9
  111.          Top             =   270
  112.          Visible         =   0   'False
  113.          Width           =   4125
  114.       End
  115.       Begin VB.Label Lab_TitleText 
  116.          AutoSize        =   -1  'True
  117.          BackStyle       =   0  'Transparent
  118.          ForeColor       =   &H00000000&
  119.          Height          =   180
  120.          Index           =   0
  121.          Left            =   5520
  122.          TabIndex        =   8
  123.          Top             =   840
  124.          Width           =   90
  125.       End
  126.       Begin VB.Label TsLabel 
  127.          AutoSize        =   -1  'True
  128.          BackStyle       =   0  'Transparent
  129.          Caption         =   "帐页格式:"
  130.          Height          =   180
  131.          Index           =   7
  132.          Left            =   7170
  133.          TabIndex        =   7
  134.          Top             =   840
  135.          Width           =   810
  136.       End
  137.       Begin VB.Label TsLabel 
  138.          BackColor       =   &H80000018&
  139.          BackStyle       =   0  'Transparent
  140.          Caption         =   "科目发生额及余额表"
  141.          BeginProperty Font 
  142.             Name            =   "宋体"
  143.             Size            =   14.25
  144.             Charset         =   134
  145.             Weight          =   700
  146.             Underline       =   0   'False
  147.             Italic          =   0   'False
  148.             Strikethrough   =   0   'False
  149.          EndProperty
  150.          ForeColor       =   &H00000000&
  151.          Height          =   450
  152.          Index           =   4
  153.          Left            =   500
  154.          TabIndex        =   3
  155.          Top             =   150
  156.          Width           =   2985
  157.       End
  158.       Begin VB.Label Lab_TitleMess 
  159.          AutoSize        =   -1  'True
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "会计期间:"
  162.          Height          =   180
  163.          Index           =   0
  164.          Left            =   4650
  165.          TabIndex        =   2
  166.          Top             =   840
  167.          Width           =   810
  168.       End
  169.    End
  170.    Begin MSComctlLib.Toolbar GsToolbar 
  171.       Height          =   525
  172.       Left            =   10110
  173.       TabIndex        =   0
  174.       Top             =   0
  175.       Width           =   1665
  176.       _ExtentX        =   2937
  177.       _ExtentY        =   926
  178.       ButtonWidth     =   1455
  179.       ButtonHeight    =   926
  180.       AllowCustomize  =   0   'False
  181.       Appearance      =   1
  182.       Style           =   1
  183.       ImageList       =   "ImageList1"
  184.       _Version        =   393216
  185.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  186.          NumButtons      =   2
  187.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  188.             Caption         =   "保存格式"
  189.             Key             =   "bcgs"
  190.             ImageKey        =   "bcgs"
  191.          EndProperty
  192.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  193.             Caption         =   "默认列宽"
  194.             Key             =   "hfmrgs"
  195.             ImageKey        =   "mrlk"
  196.          EndProperty
  197.       EndProperty
  198.    End
  199.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  200.       Height          =   6885
  201.       Left            =   60
  202.       TabIndex        =   4
  203.       Top             =   1800
  204.       Width           =   11715
  205.       _cx             =   5080
  206.       _cy             =   5080
  207.       Appearance      =   1
  208.       BorderStyle     =   1
  209.       Enabled         =   -1  'True
  210.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  211.          Name            =   "宋体"
  212.          Size            =   9
  213.          Charset         =   134
  214.          Weight          =   400
  215.          Underline       =   0   'False
  216.          Italic          =   0   'False
  217.          Strikethrough   =   0   'False
  218.       EndProperty
  219.       MousePointer    =   0
  220.       BackColor       =   16777215
  221.       ForeColor       =   -2147483640
  222.       BackColorFixed  =   12632256
  223.       ForeColorFixed  =   -2147483630
  224.       BackColorSel    =   -2147483635
  225.       ForeColorSel    =   -2147483634
  226.       BackColorBkg    =   -2147483636
  227.       BackColorAlternate=   16777215
  228.       GridColor       =   -2147483633
  229.       GridColorFixed  =   -2147483632
  230.       TreeColor       =   -2147483632
  231.       FloodColor      =   192
  232.       SheetBorder     =   -2147483642
  233.       FocusRect       =   1
  234.       HighLight       =   1
  235.       AllowSelection  =   -1  'True
  236.       AllowBigSelection=   -1  'True
  237.       AllowUserResizing=   0
  238.       SelectionMode   =   0
  239.       GridLines       =   1
  240.       GridLinesFixed  =   2
  241.       GridLineWidth   =   1
  242.       Rows            =   50
  243.       Cols            =   10
  244.       FixedRows       =   1
  245.       FixedCols       =   1
  246.       RowHeightMin    =   0
  247.       RowHeightMax    =   0
  248.       ColWidthMin     =   0
  249.       ColWidthMax     =   0
  250.       ExtendLastCol   =   0   'False
  251.       FormatString    =   ""
  252.       ScrollTrack     =   0   'False
  253.       ScrollBars      =   3
  254.       ScrollTips      =   0   'False
  255.       MergeCells      =   0
  256.       MergeCompare    =   0
  257.       AutoResize      =   -1  'True
  258.       AutoSizeMode    =   0
  259.       AutoSearch      =   0
  260.       AutoSearchDelay =   2
  261.       MultiTotals     =   -1  'True
  262.       SubtotalPosition=   1
  263.       OutlineBar      =   0
  264.       OutlineCol      =   0
  265.       Ellipsis        =   0
  266.       ExplorerBar     =   0
  267.       PicturesOver    =   0   'False
  268.       FillStyle       =   0
  269.       RightToLeft     =   0   'False
  270.       PictureType     =   0
  271.       TabBehavior     =   0
  272.       OwnerDraw       =   0
  273.       Editable        =   0
  274.       ShowComboButton =   1
  275.       WordWrap        =   0   'False
  276.       TextStyle       =   0
  277.       TextStyleFixed  =   0
  278.       OleDragMode     =   0
  279.       OleDropMode     =   0
  280.       DataMode        =   0
  281.       VirtualData     =   -1  'True
  282.       DataMember      =   ""
  283.       ComboSearch     =   3
  284.       AutoSizeMouse   =   -1  'True
  285.       FrozenRows      =   0
  286.       FrozenCols      =   0
  287.       AllowUserFreezing=   0
  288.       BackColorFrozen =   0
  289.       ForeColorFrozen =   0
  290.       WallPaperAlignment=   9
  291.       AccessibleName  =   ""
  292.       AccessibleDescription=   ""
  293.       AccessibleValue =   ""
  294.       AccessibleRole  =   24
  295.    End
  296.    Begin MSComctlLib.Toolbar SzToolbar 
  297.       Align           =   1  'Align Top
  298.       Height          =   555
  299.       Left            =   0
  300.       TabIndex        =   5
  301.       Top             =   0
  302.       Width           =   11400
  303.       _ExtentX        =   20108
  304.       _ExtentY        =   979
  305.       ButtonWidth     =   820
  306.       ButtonHeight    =   926
  307.       AllowCustomize  =   0   'False
  308.       Appearance      =   1
  309.       Style           =   1
  310.       ImageList       =   "ImageList1"
  311.       _Version        =   393216
  312.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  313.          NumButtons      =   13
  314.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  315.             Caption         =   "设置"
  316.             Key             =   "ymsz"
  317.             ImageKey        =   "sz"
  318.          EndProperty
  319.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  320.             Caption         =   "打印"
  321.             Key             =   "dy"
  322.             ImageKey        =   "dy"
  323.          EndProperty
  324.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  325.             Caption         =   "预览"
  326.             Key             =   "yl"
  327.             ImageKey        =   "yl"
  328.          EndProperty
  329.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  330.             Style           =   3
  331.          EndProperty
  332.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  333.             Caption         =   "查询"
  334.             Key             =   "cx"
  335.             ImageKey        =   "cx"
  336.          EndProperty
  337.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  338.             Style           =   3
  339.          EndProperty
  340.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  341.             Caption         =   "累计"
  342.             Key             =   "lj"
  343.             ImageKey        =   "lj"
  344.             Style           =   1
  345.          EndProperty
  346.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  347.             Style           =   3
  348.          EndProperty
  349.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  350.             Object.Visible         =   0   'False
  351.             Caption         =   "总帐"
  352.             Key             =   "zz"
  353.             ImageKey        =   "zz"
  354.          EndProperty
  355.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  356.             Object.Visible         =   0   'False
  357.             Caption         =   "明细"
  358.             Key             =   "mxz"
  359.             ImageKey        =   "mx"
  360.          EndProperty
  361.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  362.             Object.Visible         =   0   'False
  363.             Style           =   3
  364.          EndProperty
  365.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  366.             Caption         =   "帮助"
  367.             Key             =   "bz"
  368.             ImageKey        =   "bz"
  369.          EndProperty
  370.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  371.             Caption         =   "退出"
  372.             Key             =   "fh"
  373.             ImageKey        =   "tc"
  374.          EndProperty
  375.       EndProperty
  376.       BorderStyle     =   1
  377.       Begin MSComctlLib.ImageList ImageList1 
  378.          Left            =   5400
  379.          Top             =   -60
  380.          _ExtentX        =   1005
  381.          _ExtentY        =   1005
  382.          BackColor       =   -2147483643
  383.          ImageWidth      =   16
  384.          ImageHeight     =   16
  385.          MaskColor       =   12632256
  386.          _Version        =   393216
  387.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  388.             NumListImages   =   35
  389.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  390.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":35106
  391.                Key             =   "sz"
  392.             EndProperty
  393.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  394.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":354A0
  395.                Key             =   "dy"
  396.             EndProperty
  397.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  398.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3583A
  399.                Key             =   "yl"
  400.             EndProperty
  401.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  402.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":35BD4
  403.                Key             =   "xg"
  404.             EndProperty
  405.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  406.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":35F6E
  407.                Key             =   "zh"
  408.             EndProperty
  409.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  410.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":36308
  411.                Key             =   "sh"
  412.             EndProperty
  413.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  414.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":366A2
  415.                Key             =   "bc"
  416.             EndProperty
  417.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  418.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":36A3C
  419.                Key             =   "fq"
  420.             EndProperty
  421.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  422.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":36DD6
  423.                Key             =   "bz"
  424.             EndProperty
  425.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  426.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":37170
  427.                Key             =   "tc"
  428.             EndProperty
  429.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  430.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3750A
  431.                Key             =   "bcgs"
  432.             EndProperty
  433.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  434.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":378A4
  435.                Key             =   "mrlk"
  436.             EndProperty
  437.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  438.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":37C3E
  439.                Key             =   "xsxm"
  440.             EndProperty
  441.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  442.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":37FD8
  443.                Key             =   "first"
  444.             EndProperty
  445.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":38372
  447.                Key             =   "prev"
  448.             EndProperty
  449.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3870C
  451.                Key             =   "next"
  452.             EndProperty
  453.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":38AA6
  455.                Key             =   "last"
  456.             EndProperty
  457.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":38E40
  459.                Key             =   "xx"
  460.             EndProperty
  461.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":391DA
  463.                Key             =   "define"
  464.             EndProperty
  465.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":39574
  467.                Key             =   "exec"
  468.             EndProperty
  469.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3990E
  471.                Key             =   "xz"
  472.             EndProperty
  473.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":39CA8
  475.                Key             =   "sc"
  476.             EndProperty
  477.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3A042
  479.                Key             =   "sx"
  480.             EndProperty
  481.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3A3DC
  483.                Key             =   "cx"
  484.             EndProperty
  485.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3A776
  487.                Key             =   "zd"
  488.             EndProperty
  489.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3AB10
  491.                Key             =   "dz"
  492.             EndProperty
  493.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3AEAA
  495.                Key             =   "ph"
  496.             EndProperty
  497.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3B244
  499.                Key             =   "fz"
  500.             EndProperty
  501.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3B5DE
  503.                Key             =   "dw"
  504.             EndProperty
  505.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3B978
  507.                Key             =   "hf"
  508.             EndProperty
  509.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3BD12
  511.                Key             =   "pz"
  512.             EndProperty
  513.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3C0AC
  515.                Key             =   "check"
  516.             EndProperty
  517.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3C446
  519.                Key             =   "zz"
  520.             EndProperty
  521.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3C7E0
  523.                Key             =   "mx"
  524.             EndProperty
  525.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "辅助_供应商往来_科目余额表查询结果.frx":3CB7A
  527.                Key             =   "lj"
  528.             EndProperty
  529.          EndProperty
  530.       End
  531.    End
  532. End
  533. Attribute VB_Name = "ZF_Gys_FrmKmyebjg"
  534. Attribute VB_GlobalNameSpace = False
  535. Attribute VB_Creatable = False
  536. Attribute VB_PredeclaredId = True
  537. Attribute VB_Exposed = False
  538. '*******************************************************************
  539. '*    模 块 名 称 :科目发生额及余额表(供应商往来)
  540. '*    功 能 描 述 :本功能用于查询统计涉及查询科目的供应商的本期发
  541. '*                 生额、累计发生额和余额等。并支持包含未记帐凭
  542. '*                 证查询1。
  543. '*    程序员姓名  :张建忠
  544. '*    最后修改人  :奚俊峰
  545. '*    最后修改时间:2001/12/27
  546. '*    备        注:在此查询中采用了Union联合查询,这种方式可以大大加
  547. '*                 快查询速度.
  548. '*******************************************************************
  549. Dim ReportTitle As String                '报表主标题
  550. '以下为固定使用变量
  551. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  552. Dim GridCode As String                   '显示网格网格代码
  553. Dim GridInf() As Variant                 '整个网格设置信息
  554. Dim Tsxx As String                       '系统提示信息
  555. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  556. Dim Sjhgd As Double                      '网格数据行高度
  557. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  558. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  559. Dim GridStr()  As String                 '网格列信息(字符型)
  560. Dim GridInt() As Integer                 '网格列信息(整型)
  561. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  562. Dim Bln_Stop As Boolean                  '停止输出查询结果
  563. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  564.     On Error Resume Next
  565.     With CxbbGrid
  566.         .Width = Me.Width - 160
  567.         .Height = Me.Height - .Top - 400
  568.     End With
  569.     With Pic_Title
  570.         .Width = Me.Width - 160
  571.     End With
  572.     
  573.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  574. End Sub
  575. Private Sub Form_Load()                  '窗体装入
  576.     
  577.     '调入打印页面设置窗体
  578.     XtReportCode = "Cwzz_gyswl_kmyeb"
  579.     Load Dyymctbl
  580.     ReportTitle = "科目发生额及余额表"
  581.     
  582.     '调整标题栏及网格、格式工具条位置
  583.     Pic_Title.Left = 40
  584.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  585.     CxbbGrid.Left = Pic_Title.Left
  586.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  587.     
  588.     '调 入 网 格
  589.     GridCode = "Cwzz_gyswl_kmyeb"
  590.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  591.     
  592.     Qslz = GridInf(1)
  593.     Sjhgd = GridInf(2)
  594.     Sfxshjwg = GridInf(7)
  595.     Szzls = CxbbGrid.Cols - 1
  596.     
  597.     '帐页格式
  598.     Call FillCombo(Combo_AccFormat, "Cwzz_zygs", "", 0)
  599.     
  600.     '辅助核算查询排序方式
  601.     Call FillCombo(Combo_FzPxfs, "Cwzz_FzPxfs", "", 0)
  602.     
  603.     '调整标题位置
  604.     SetTitlePos tsLabel(4)
  605. End Sub
  606. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  607.     '卸载条件窗体
  608.     ZF_Gys_FrmKmyebtj.UnloadCheck.Value = 1
  609.     Unload ZF_Gys_FrmKmyebtj
  610.     '卸载打印页面设置窗体
  611.     Unload Dyymctbl
  612. End Sub
  613. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  614.     Select Case Button.Key
  615.     Case "bcgs"                                          '保存表格格式
  616.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  617.     Case "hfmrgs"                                        '恢复默认格式
  618.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  619.     Case "szxsxm"                                        '设置显示项目
  620.         Call Szxsxm(CxbbGrid, GridCode)
  621.     End Select
  622. End Sub
  623. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  624.     Select Case Button.Key
  625.     Case "ymsz"                                          '页面设置
  626.         Dyymctbl.Show 1
  627.     Case "yl"                                            '预 览
  628.         Call bbyl(True)
  629.     Case "dy"                                            '打 印
  630.         Call bbyl(False)
  631.     Case "cx"                                            '查 询
  632.         ZF_Gys_FrmKmyebtj.Show 1
  633.     Case "lj"                                            '累 计
  634.         Call Combo_AccFormat_Click
  635.         '      Case "zz"                                            '总 帐
  636.         '        Call Sub_LcZflz
  637.         '      Case "mxz"                                           '明细帐
  638.         '        Call Sub_Lcmxz
  639.     Case "bz"                                            '帮 助
  640.         Call F1bz
  641.     Case "fh"                                            '退 出
  642.         Unload Me
  643.     End Select
  644. End Sub
  645. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  646.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  647.     Timer1.Enabled = False
  648.     
  649.     '辅助查询科目
  650.     Call FillImageCombo(Imgebo_FzCcode, "Cwzz_gyswlkm", 0)
  651.     
  652.     For Jsqte = 1 To Imgebo_FzCcode.ComboItems.count
  653.         If Imgebo_FzCcode.ComboItems.Item(Jsqte).Text = ZF_Gys_FrmKmyebtj.Imgebo_FzCcode.Text Then
  654.             Imgebo_FzCcode.ComboItems.Item(Jsqte).Selected = True
  655.             Imgebo_FzCcode.Refresh
  656.             Exit For
  657.         End If
  658.     Next Jsqte
  659.     
  660.     Call Imgebo_FzCcode_Click
  661. End Sub
  662. Private Sub Imgebo_FzCcode_Click()                                    '用户点击科目列表框
  663.     '加快显示速度
  664.     CxbbGrid.Redraw = False
  665.     
  666.     Xt_Wait.Show
  667.     Xt_Wait.Refresh
  668.     
  669.     '生成查询结果
  670.     Call Sub_Query
  671.     
  672.     Call Combo_AccFormat_Click
  673.     
  674.     Call Combo_FzPxfs_Click
  675.     
  676.     CxbbGrid.SetFocus
  677.     
  678.     CxbbGrid.Redraw = True
  679.     
  680.     Xt_Wait.Hide
  681. End Sub
  682. Private Sub Sub_Query()                                    '生成查询结果
  683.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  684.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  685.     Dim Rec_AccSum As New ADODB.Recordset       '科目总帐动态集
  686.     Dim Str_QueryCondi As String                '用户录入查询条件
  687.     Dim Sqlstr As String                        '查询字符串
  688.     Dim Coljsq As Long                          '网格列计数器
  689.     Dim Jsqte As Long                           '临时动态计数器
  690.     Dim Bln_IncluNotBook As Boolean             '是否包含未记帐凭证
  691.     Dim Bln_EndFlag As Boolean                  '判断当前科目是否为末级科目
  692.     Dim Bln_ForeignFlag As Boolean              '判断此科目是否外币核算
  693.     Dim Int_Tjfx As Integer                     '余额统计方向
  694.     Dim Dbl_BeginYe As Double                   '查询起始余额
  695.     Dim Dbl_EndYe As Double                     '查询终止余额
  696.     Dim Bln_Fhxstj As Boolean                   '记录是否符合显示条件
  697.     Dim Int_BPeriod As Integer                  '查询起始会计期间
  698.     Dim Int_EPeriod As Integer                  '查询终止会计期间
  699.     Dim Int_Year As Integer                     '查询会计年度
  700.     Dim Str_Ccode As String                     '查询会计科目
  701.     Dim Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#   '期初金额,数量,外币
  702.     Dim Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj# '本期合计(金额,数量,外币)
  703.     Dim Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj# '截止累计(金额,数量,外币)
  704.     Dim Dbl_Qmyete#, Dbl_Qmslte#, Dbl_Qmwbte#   '期末金额,数量,外币
  705.     Dim Dbl_Sjzj(1 To 18) As Double             '数据总计
  706.     Dim Bln_NotShowEmpty As Boolean             '数据全部为零不显示
  707.     
  708.     ' 以下为用户自定义部分
  709.     
  710.     If Imgebo_FzCcode.ComboItems.count = 0 Then Exit Sub
  711.     
  712.     With ZF_Gys_FrmKmyebtj
  713.         
  714.         '得到当前查询科目,并判断是否为末级科目
  715.         Str_Ccode = GetComboKey(Imgebo_FzCcode, 0)
  716.         Sqlstr = "SELECT EndFlag,AccFormat,ForeignFlag,ForeignCurrName,ConVertFlag From Cwzz_AccCode Left JOIN Gy_ForeignCurrency ON" & _
  717.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode Where Ccode='" & Str_Ccode & "'"
  718.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  719.         If Not RecTemp.EOF Then
  720.             Bln_EndFlag = RecTemp.Fields("EndFlag")
  721.             Combo_AccFormat.Text = Trim(RecTemp.Fields("AccFormat") & "")
  722.             If RecTemp.Fields("ForeignFlag") Then
  723.                 Lab_TitleMess(2).Visible = True
  724.                 Lab_TitleText(1).Caption = Trim(RecTemp.Fields("ForeignCurrName") & "")
  725.                 Bln_ForeignFlag = True
  726.                 Bln_ConVertFlag = IIf(IsNull(RecTemp.Fields("ConVertFlag")), False, RecTemp.Fields("ConVertFlag"))
  727.             Else
  728.                 Lab_TitleMess(2).Visible = False
  729.                 Bln_ForeignFlag = False
  730.                 Lab_TitleText(1).Caption = ""
  731.             End If
  732.         End If
  733.         
  734.         '显示查询会计期间
  735.         Lab_TitleText(0).Caption = .Combo_Kjqj(0).Text & "-" & .Combo_Kjqj(1)
  736.         Int_Year = Int(Mid(.Combo_Kjqj(0).Text, 1, 4))
  737.         Int_BPeriod = Int(Mid(.Combo_Kjqj(0).Text, 6, 2))
  738.         Int_EPeriod = Int(Mid(.Combo_Kjqj(1).Text, 6, 2))
  739.         
  740.         '是否包含未记帐凭证
  741.         If .Chk_NotBook.Value = 1 Then
  742.             Bln_IncluNotBook = True
  743.         Else
  744.             Bln_IncluNotBook = False
  745.         End If
  746.         
  747.         '辅助项数据为零不显示
  748.         If .Chk_NotOuputZero.Value = 1 Then
  749.             Bln_NotShowEmpty = True
  750.         Else
  751.             Bln_NotShowEmpty = False
  752.         End If
  753.         
  754.         '余额统计方向
  755.         For Jsqte = 0 To 2
  756.             If .Opt_Tjfx(Jsqte).Value = True Then
  757.                 Int_Tjfx = Jsqte
  758.             End If
  759.         Next Jsqte
  760.         
  761.         '查询起始终止余额
  762.         Dbl_BeginYe = Val(.LrText(2).Text)
  763.         Dbl_EndYe = Val(.LrText(3).Text)
  764.         
  765.         Str_QueryCondi = " where 1=1 "
  766.         For Jsqte = 1 To 4
  767.             Select Case Jsqte
  768.             Case 1   '供应商编码范围(起始供应商编码)
  769.                 Str_QueryCondi = Str_QueryCondi & " and b.SupplierCode>='" & Trim(.LrText(0).Text) & "'"
  770.             Case 2   '供应商编码范围(终止供应商编码)
  771.                 If Trim(.LrText(1).Text) <> "" Then
  772.                     Str_QueryCondi = Str_QueryCondi & " and b.SupplierCode<='" & Trim(.LrText(1).Text) & "'"
  773.                 End If
  774.             End Select
  775.         Next Jsqte
  776.     End With
  777.     
  778.     '计算所有用户选中辅助项目数据(供应商)
  779.     If Bln_IncluNotBook Then
  780.         Sqlstr = " Select b.*,Gy_Supplier.SupplierName From (Select a.SupplierCode,QcyeHJ=Sum(a.qcyehj),Qcslhj=Sum(Qcslhj),QcwbHj=Sum(QcwbHj),Mjjehj=Sum(Mjjehj),Mdjehj=Sum(Mdjehj),MjslHJ=Sum(Mjslhj),MdslHJ=Sum(Mdslhj),Mjwbhj=Sum(Mjwbhj),Mdwbhj=Sum(Mdwbhj),ByjfljjeHj=Sum(ByjfljjeHj),Bydfljjehj=Sum(BydfljjeHj),Byjfljslhj=Sum(ByjfljslHj),Bydfljslhj=Sum(Bydfljslhj),Byjfljwbhj=Sum(Byjfljwbhj),Bydfljwbhj=Sum(Bydfljwbhj) From " & _
  781.         " ((SELECT SupplierCode,QcyeHj=Sum(Qcye),Qcslhj=Sum(Qcsl),QcwbHj=Sum(Qcwb),Mjjehj=0,Mdjehj=0,MjslHJ=0,MdslHJ=0,Mjwbhj=0,Mdwbhj=0,ByjfljjeHj=0,Bydfljjehj=0,Byjfljslhj=0,Bydfljslhj=0,Byjfljwbhj=0,Bydfljwbhj=0 From Cwzz_AccSumAssi Where Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period=" & Int_BPeriod & " Group By Cwzz_AccSumAssi.SupplierCode) union all " & _
  782.         " (SELECT SupplierCode,Qcyehj=Sum(Jfje-Dfje),Qcslhj=Sum(Jfsl-Dfsl),QcwbHj=Sum(Wbjfje-Wbdfje),Mjjehj=0,Mdjehj=0,MjslHJ=0,MdslHJ=0,Mjwbhj=0,Mdwbhj=0,ByjfljjeHj=0,Bydfljjehj=0,Byjfljslhj=0,Bydfljslhj=0,Byjfljwbhj=0,Bydfljwbhj=0 From Cwzz_V_AccVouch Where BookFlag=0 And Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period<" & Int_BPeriod & " Group By Cwzz_V_AccVouch.SupplierCode) union all " & _
  783.         " (SELECT SupplierCode,QcyeHJ=0,Qcslhj=0,QcwbHj=0,Mjjehj=Sum(Jfje),Mdjehj=Sum(Dfje),Mjslhj=Sum(Jfsl),Mdslhj=Sum(Dfsl),Mjwbhj=Sum(Wbjfje),Mdwbhj=Sum(Wbdfje),ByjfljjeHj=0,Bydfljjehj=0,Byjfljslhj=0,Bydfljslhj=0,Byjfljwbhj=0,Bydfljwbhj=0 From Cwzz_V_AccVouch Where Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period>=" & Int_BPeriod & " And Period <=" & Int_EPeriod & " Group By SupplierCode) Union All " & _
  784.         " (SELECT SupplierCode,QcyeHJ=0,Qcslhj=0,QcwbHj=0,Mjjehj=0,Mdjehj=0,Mjslhj=0,Mdslhj=0,Mjwbhj=0,Mdwbhj=0,ByjfljjeHj=Sum(Jfje),Bydfljjehj=Sum(Dfje),Byjfljslhj=Sum(Jfsl),Bydfljslhj=Sum(Dfsl),Byjfljwbhj=Sum(Wbjfje),Bydfljwbhj=Sum(Wbdfje) From Cwzz_V_AccVouch Where Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period<= " & Int_EPeriod & " Group By SupplierCode)) a  Group By A.SupplierCode) b JOIN" & _
  785.         "  Gy_Supplier ON b.SupplierCode = Gy_Supplier.SupplierCode" & Str_QueryCondi
  786.     Else
  787.         Sqlstr = " Select b.*,Gy_Supplier.SupplierName From (Select a.SupplierCode,QcyeHJ=Sum(a.qcyehj),Qcslhj=Sum(Qcslhj),QcwbHj=Sum(QcwbHj),Mjjehj=Sum(Mjjehj),Mdjehj=Sum(Mdjehj),MjslHJ=Sum(Mjslhj),MdslHJ=Sum(Mdslhj),Mjwbhj=Sum(Mjwbhj),Mdwbhj=Sum(Mdwbhj),ByjfljjeHj=Sum(ByjfljjeHj),Bydfljjehj=Sum(BydfljjeHj),Byjfljslhj=Sum(ByjfljslHj),Bydfljslhj=Sum(Bydfljslhj),Byjfljwbhj=Sum(Byjfljwbhj),Bydfljwbhj=Sum(Bydfljwbhj) From " & _
  788.         " ((SELECT SupplierCode,QcyeHj=Sum(Qcye),Qcslhj=Sum(Qcsl),QcwbHj=Sum(Qcwb),Mjjehj=0,Mdjehj=0,MjslHJ=0,MdslHJ=0,Mjwbhj=0,Mdwbhj=0,ByjfljjeHj=0,Bydfljjehj=0,Byjfljslhj=0,Bydfljslhj=0,Byjfljwbhj=0,Bydfljwbhj=0 From Cwzz_AccSumAssi Where Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period=" & Int_BPeriod & " Group By Cwzz_AccSumAssi.SupplierCode) union all " & _
  789.         " (SELECT SupplierCode,QcyeHJ=0,Qcslhj=0,QcwbHj=0,Mjjehj=Sum(Jfje),Mdjehj=Sum(Dfje),Mjslhj=Sum(Jfsl),Mdslhj=Sum(Dfsl),Mjwbhj=Sum(Wbjfje),Mdwbhj=Sum(Wbdfje),ByjfljjeHj=0,Bydfljjehj=0,Byjfljslhj=0,Bydfljslhj=0,Byjfljwbhj=0,Bydfljwbhj=0 From Cwzz_V_AccVouch Where BookFlag=1 And Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period>=" & Int_BPeriod & " And Period <=" & Int_EPeriod & " Group By SupplierCode) Union All " & _
  790.         " (SELECT SupplierCode,QcyeHJ=0,Qcslhj=0,QcwbHj=0,Mjjehj=0,Mdjehj=0,Mjslhj=0,Mdslhj=0,Mjwbhj=0,Mdwbhj=0,ByjfljjeHj=Sum(Jfje),Bydfljjehj=Sum(Dfje),Byjfljslhj=Sum(Jfsl),Bydfljslhj=Sum(Dfsl),Byjfljwbhj=Sum(Wbjfje),Bydfljwbhj=Sum(Wbdfje) From Cwzz_V_AccVouch Where BookFlag=1 And Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & " And Period<= " & Int_EPeriod & " Group By SupplierCode)) a  Group By A.SupplierCode) b JOIN" & _
  791.         "  Gy_Supplier ON b.SupplierCode = Gy_Supplier.SupplierCode" & Str_QueryCondi
  792.     End If
  793.     
  794.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  795.     With Rec_Query
  796.         
  797.         CxbbGrid.Rows = CxbbGrid.FixedRows
  798.         Jsqte = CxbbGrid.FixedRows - 1
  799.         
  800.         Do While Not .EOF
  801.             
  802.             Dbl_Qcyete = Rec_Query.Fields("QcyeHj")
  803.             Dbl_Qcslte = Rec_Query.Fields("QcslHj")
  804.             Dbl_Qcwbte = Rec_Query.Fields("QcwbHj")
  805.             Dbl_Jejfhj = Rec_Query.Fields("Mjjehj")
  806.             Dbl_Jedfhj = Rec_Query.Fields("Mdjehj")
  807.             Dbl_Sljfhj = Rec_Query.Fields("Mjslhj")
  808.             Dbl_Sldfhj = Rec_Query.Fields("Mdslhj")
  809.             Dbl_Wbjfhj = Rec_Query.Fields("Mjwbhj")
  810.             Dbl_Wbdfhj = Rec_Query.Fields("Mdwbhj")
  811.             Dbl_Jejflj = Rec_Query.Fields("Byjfljjehj")
  812.             Dbl_Jedflj = Rec_Query.Fields("Bydfljjehj")
  813.             Dbl_Sljflj = Rec_Query.Fields("Byjfljslhj")
  814.             Dbl_Sldflj = Rec_Query.Fields("Bydfljslhj")
  815.             Dbl_Wbjflj = Rec_Query.Fields("Byjfljwbhj")
  816.             Dbl_Wbdflj = Rec_Query.Fields("Bydfljwbhj")
  817.             Dbl_Qmyete = Dbl_Qcyete + Dbl_Jejfhj - Dbl_Jedfhj
  818.             Dbl_Qmslte = Dbl_Qcslte + Dbl_Sljfhj - Dbl_Sldfhj
  819.             Dbl_Qmwbte = Dbl_Qcwbte + Dbl_Wbjfhj - Dbl_Wbdfhj
  820.             
  821.             '判断是否输出数据
  822.             
  823.             Bln_Fhxstj = False
  824.             
  825.             If Bln_NotShowEmpty Then
  826.                 If Dbl_Qcyete <> 0 Or Dbl_Qcslte <> 0 Or Dbl_Qcwbte <> 0 Then
  827.                     Bln_Fhxstj = True
  828.                 End If
  829.                 If Dbl_Jejfhj <> 0 Or Dbl_Jedfhj <> 0 Or Dbl_Sljfhj <> 0 Or Dbl_Sldfhj <> 0 Or Dbl_Wbjfhj <> 0 Or Dbl_Wbdfhj <> 0 Then
  830.                     Bln_Fhxstj = True
  831.                 End If
  832.                 If Dbl_Jejflj <> 0 Or Dbl_Jedflj <> 0 Or Dbl_Sljflj <> 0 Or Dbl_Sldflj <> 0 Or Dbl_Wbjflj <> 0 Or Dbl_Wbdflj <> 0 Then
  833.                     Bln_Fhxstj = True
  834.                 End If
  835.             Else
  836.                 Bln_Fhxstj = True
  837.             End If
  838.             
  839.             If Bln_Fhxstj Then
  840.                 Bln_Fhxstj = False
  841.                 
  842.                 '判断期末余额是否符合查询条件
  843.                 Select Case Int_Tjfx
  844.                 Case 0
  845.                     If Abs(Dbl_Qmyete) >= Dbl_BeginYe Then
  846.                         If Dbl_EndYe <> 0 Then
  847.                             If Abs(Dbl_Qmyete) <= Dbl_EndYe Then
  848.                                 Bln_Fhxstj = True
  849.                             End If
  850.                         Else
  851.                             Bln_Fhxstj = True
  852.                         End If
  853.                     End If
  854.                 Case 1
  855.                     If Dbl_Qmyete >= 0 And Abs(Dbl_Qmyete) >= Dbl_BeginYe Then
  856.                         If Dbl_EndYe <> 0 Then
  857.                             If Abs(Dbl_Qmyete) <= Dbl_EndYe Then
  858.                                 Bln_Fhxstj = True
  859.                             End If
  860.                         Else
  861.                             Bln_Fhxstj = True
  862.                         End If
  863.                     End If
  864.                 Case 2
  865.                     If Dbl_Qmyete <= 0 And Abs(Dbl_Qmyete) >= Dbl_BeginYe Then
  866.                         If Dbl_EndYe <> 0 Then
  867.                             If Abs(Dbl_Qmyete) <= Dbl_EndYe Then
  868.                                 Bln_Fhxstj = True
  869.                             End If
  870.                         Else
  871.                             Bln_Fhxstj = True
  872.                         End If
  873.                     End If
  874.                 End Select
  875.             End If
  876.             
  877.             '数据输出
  878.             If Bln_Fhxstj Then
  879.                 CxbbGrid.AddItem ""
  880.                 Jsqte = Jsqte + 1
  881.                 
  882.                 '数据总计
  883.                 Dbl_Sjzj(1) = Dbl_Sjzj(1) + Dbl_Qcyete
  884.                 Dbl_Sjzj(2) = Dbl_Sjzj(2) + Dbl_Qcslte
  885.                 Dbl_Sjzj(3) = Dbl_Sjzj(3) + Dbl_Qcwbte
  886.                 Dbl_Sjzj(4) = Dbl_Sjzj(4) + Dbl_Jejfhj
  887.                 Dbl_Sjzj(5) = Dbl_Sjzj(5) + Dbl_Jedfhj
  888.                 Dbl_Sjzj(6) = Dbl_Sjzj(6) + Dbl_Sljfhj
  889.                 Dbl_Sjzj(7) = Dbl_Sjzj(7) + Dbl_Sldfhj
  890.                 Dbl_Sjzj(8) = Dbl_Sjzj(8) + Dbl_Wbjfhj
  891.                 Dbl_Sjzj(9) = Dbl_Sjzj(9) + Dbl_Wbdfhj
  892.                 Dbl_Sjzj(10) = Dbl_Sjzj(10) + Dbl_Jejflj
  893.                 Dbl_Sjzj(11) = Dbl_Sjzj(11) + Dbl_Jedflj
  894.                 Dbl_Sjzj(12) = Dbl_Sjzj(12) + Dbl_Sljflj
  895.                 Dbl_Sjzj(13) = Dbl_Sjzj(13) + Dbl_Sldflj
  896.                 Dbl_Sjzj(14) = Dbl_Sjzj(14) + Dbl_Wbjflj
  897.                 Dbl_Sjzj(15) = Dbl_Sjzj(15) + Dbl_Wbdflj
  898.                 Dbl_Sjzj(16) = Dbl_Sjzj(16) + Dbl_Qmyete
  899.                 Dbl_Sjzj(17) = Dbl_Sjzj(17) + Dbl_Qmslte
  900.                 Dbl_Sjzj(18) = Dbl_Sjzj(18) + Dbl_Qmwbte
  901.                 CxbbGrid.RowHeight(Jsqte) = Sjhgd
  902.                 
  903.                 CxbbGrid.TextMatrix(Jsqte, 0) = "0" + Trim(.Fields("SupplierCode"))          '供应商编码
  904.                 CxbbGrid.TextMatrix(Jsqte, 1) = "0" + Trim(.Fields("SupplierName") & "")     '供应商名称
  905.                 
  906.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("SupplierCode"))            '供应商编码
  907.                 CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")       '供应商名称
  908.                 
  909.                 
  910.                 '将期初数据写入网格
  911.                 If Dbl_Qcyete = 0 Then
  912.                     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "平"     '期初方向
  913.                     If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  914.                         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Qcslte
  915.                     End If
  916.                     If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  917.                         CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Qcwbte
  918.                     End If
  919.                 Else
  920.                     
  921.                     If Dbl_Qcyete > 0 Then
  922.                         CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "借"
  923.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Dbl_Qcyete
  924.                         CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Qcyete
  925.                         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  926.                             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Qcslte
  927.                         End If
  928.                         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  929.                             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Qcwbte
  930.                         End If
  931.                     Else
  932.                         CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "贷"
  933.                         CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = -Dbl_Qcyete
  934.                         CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = -Dbl_Qcyete
  935.                         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  936.                             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = -Dbl_Qcslte
  937.                         End If
  938.                         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  939.                             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = -Dbl_Qcwbte
  940.                         End If
  941.                     End If
  942.                 End If
  943.                 
  944.                 '将期间合计数据写入网格
  945.                 If Dbl_Jejfhj <> 0 Then
  946.                     CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj       '本期发生.借方
  947.                     CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jejfhj       '本期借方发生.金额
  948.                 End If
  949.                 If Dbl_Jedfhj <> 0 Then
  950.                     CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj       '本期发生.贷方
  951.                     CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Dbl_Jedfhj       '本期贷方发生.金额
  952.                 End If
  953.                 
  954.                 '仅有末级科目才显示数量,外币
  955.                 If Bln_EndFlag Then
  956.                     If Dbl_Sljfhj <> 0 Then
  957.                         CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sljfhj   '本期借方发生.数量
  958.                     End If
  959.                     If Dbl_Sldfhj <> 0 Then
  960.                         CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = Dbl_Sldfhj   '本期贷方发生.数量
  961.                     End If
  962.                 End If
  963.                 If Bln_EndFlag And Bln_ForeignFlag Then
  964.                     If Dbl_Wbjfhj <> 0 Then
  965.                         CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbjfhj   '本期借方发生.外币
  966.                     End If
  967.                     If Dbl_Wbdfhj <> 0 Then
  968.                         CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Wbdfhj   '本期贷方发生.外币
  969.                     End If
  970.                 End If
  971.                 
  972.                 '将截止累计数据写入网格
  973.                 If Dbl_Jejflj <> 0 Then
  974.                     CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Jejflj       '累计发生.借方
  975.                     CxbbGrid.TextMatrix(Jsqte, Sydz("021", GridStr(), Szzls)) = Dbl_Jejflj       '累计借方发生.金额
  976.                 End If
  977.                 If Dbl_Jedflj <> 0 Then
  978.                     CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Dbl_Jedflj       '累计发生.贷方
  979.                     CxbbGrid.TextMatrix(Jsqte, Sydz("024", GridStr(), Szzls)) = Dbl_Jedflj       '累计贷方发生.金额
  980.                 End If
  981.                 
  982.                 '仅有末级科目才显示数量,外币
  983.                 If Bln_EndFlag Then
  984.                     If Dbl_Sljflj <> 0 Then
  985.                         CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Dbl_Sljflj   '累计借方发生.数量
  986.                     End If
  987.                     If Dbl_Sldflj <> 0 Then
  988.                         CxbbGrid.TextMatrix(Jsqte, Sydz("022", GridStr(), Szzls)) = Dbl_Sldflj   '累计贷方发生.数量
  989.                     End If
  990.                 End If
  991.                 If Bln_EndFlag And Bln_ForeignFlag Then
  992.                     If Dbl_Wbjflj <> 0 Then
  993.                         CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Dbl_Wbjflj   '累计借方发生.外币
  994.                     End If
  995.                     If Dbl_Wbdflj <> 0 Then
  996.                         CxbbGrid.TextMatrix(Jsqte, Sydz("023", GridStr(), Szzls)) = Dbl_Wbdflj   '累计贷方发生.外币
  997.                     End If
  998.                 End If
  999.                 
  1000.                 '4.将期末数据写入网格
  1001.                 If Dbl_Qmyete = 0 Then
  1002.                     CxbbGrid.TextMatrix(Jsqte, Sydz("025", GridStr(), Szzls)) = "平"     '期初方向
  1003.                     If Bln_EndFlag And Dbl_Qmslte <> 0 Then
  1004.                         CxbbGrid.TextMatrix(Jsqte, Sydz("028", GridStr(), Szzls)) = Dbl_Qmslte
  1005.                     End If
  1006.                     If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qmwbte <> 0 Then
  1007.                         CxbbGrid.TextMatrix(Jsqte, Sydz("029", GridStr(), Szzls)) = Dbl_Qmwbte
  1008.                     End If
  1009.                 Else
  1010.                     If Dbl_Qmyete > 0 Then
  1011.                         CxbbGrid.TextMatrix(Jsqte, Sydz("025", GridStr(), Szzls)) = "借"
  1012.                         CxbbGrid.TextMatrix(Jsqte, Sydz("026", GridStr(), Szzls)) = Dbl_Qmyete
  1013.                         CxbbGrid.TextMatrix(Jsqte, Sydz("030", GridStr(), Szzls)) = Dbl_Qmyete
  1014.                         If Bln_EndFlag And Dbl_Qmslte <> 0 Then
  1015.                             CxbbGrid.TextMatrix(Jsqte, Sydz("028", GridStr(), Szzls)) = Dbl_Qmslte
  1016.                         End If
  1017.                         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qmwbte <> 0 Then
  1018.                             CxbbGrid.TextMatrix(Jsqte, Sydz("029", GridStr(), Szzls)) = Dbl_Qmwbte
  1019.                         End If
  1020.                     Else
  1021.                         CxbbGrid.TextMatrix(Jsqte, Sydz("025", GridStr(), Szzls)) = "贷"
  1022.                         CxbbGrid.TextMatrix(Jsqte, Sydz("027", GridStr(), Szzls)) = -Dbl_Qmyete
  1023.                         CxbbGrid.TextMatrix(Jsqte, Sydz("030", GridStr(), Szzls)) = -Dbl_Qmyete
  1024.                         If Bln_EndFlag And Dbl_Qmslte <> 0 Then
  1025.                             CxbbGrid.TextMatrix(Jsqte, Sydz("028", GridStr(), Szzls)) = -Dbl_Qmslte
  1026.                         End If
  1027.                         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qmwbte <> 0 Then
  1028.                             CxbbGrid.TextMatrix(Jsqte, Sydz("029", GridStr(), Szzls)) = -Dbl_Qmwbte
  1029.                         End If
  1030.                     End If
  1031.                 End If
  1032.             End If
  1033.             
  1034.             '移动到下一条记录
  1035.             .MoveNext
  1036.         Loop
  1037.         
  1038.         Call Sub_ShowSum(Bln_EndFlag, Bln_ForeignFlag, Dbl_Sjzj())       '显示数据总计
  1039.         
  1040.     End With
  1041.     
  1042. End Sub
  1043. Private Sub Sub_ShowSum(Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dbl_Sjzj() As Double)       '显示数据总计
  1044.     If CxbbGrid.FixedRows = CxbbGrid.Rows Then
  1045.         Exit Sub
  1046.     End If
  1047.     
  1048.     CxbbGrid.AddItem ""
  1049.     CxbbGrid.RowHeight(CxbbGrid.Rows - 1) = Sjhgd
  1050.     CxbbGrid.Cell(flexcpBackColor, CxbbGrid.Rows - 1, 0, , CxbbGrid.Cols - 1) = &HFFFF00
  1051.     
  1052.     '为了排序
  1053.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, 0) = "1"
  1054.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, 1) = "1"
  1055.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("001", GridStr(), Szzls)) = "合  计"
  1056.     
  1057.     '将期初数据写入网格
  1058.     If Dbl_Sjzj(1) = 0 Then
  1059.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("003", GridStr(), Szzls)) = "平"   '期初方向
  1060.         If Bln_EndFlag And Dbl_Sjzj(2) <> 0 Then
  1061.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("006", GridStr(), Szzls)) = Dbl_Sjzj(2)
  1062.         End If
  1063.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(3) <> 0 Then
  1064.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("007", GridStr(), Szzls)) = Dbl_Sjzj(3)
  1065.         End If
  1066.     Else
  1067.         If Dbl_Sjzj(1) > 0 Then
  1068.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("003", GridStr(), Szzls)) = "借"
  1069.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("004", GridStr(), Szzls)) = Dbl_Sjzj(1)
  1070.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("008", GridStr(), Szzls)) = Dbl_Sjzj(1)
  1071.             If Bln_EndFlag And Dbl_Sjzj(2) <> 0 Then
  1072.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("006", GridStr(), Szzls)) = Dbl_Sjzj(2)
  1073.             End If
  1074.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(3) <> 0 Then
  1075.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("007", GridStr(), Szzls)) = Dbl_Sjzj(3)
  1076.             End If
  1077.         Else
  1078.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("003", GridStr(), Szzls)) = "贷"
  1079.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("005", GridStr(), Szzls)) = -Dbl_Sjzj(1)
  1080.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("008", GridStr(), Szzls)) = -Dbl_Sjzj(1)
  1081.             If Bln_EndFlag And Dbl_Sjzj(2) <> 0 Then
  1082.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("006", GridStr(), Szzls)) = -Dbl_Sjzj(2)
  1083.             End If
  1084.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(3) <> 0 Then
  1085.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("007", GridStr(), Szzls)) = -Dbl_Sjzj(3)
  1086.             End If
  1087.         End If
  1088.     End If
  1089.     
  1090.     '将期间合计数据写入网格
  1091.     If Dbl_Sjzj(4) <> 0 Then
  1092.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("009", GridStr(), Szzls)) = Dbl_Sjzj(4)     '本期发生.借方
  1093.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("013", GridStr(), Szzls)) = Dbl_Sjzj(4)     '本期借方发生.金额
  1094.     End If
  1095.     If Dbl_Sjzj(5) <> 0 Then
  1096.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("010", GridStr(), Szzls)) = Dbl_Sjzj(5)     '本期发生.贷方
  1097.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("016", GridStr(), Szzls)) = Dbl_Sjzj(5)     '本期贷方发生.金额
  1098.     End If
  1099.     
  1100.     '仅有末级科目才显示数量,外币
  1101.     If Bln_EndFlag Then
  1102.         If Dbl_Sjzj(6) <> 0 Then
  1103.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("011", GridStr(), Szzls)) = Dbl_Sjzj(6) '本期借方发生.数量
  1104.         End If
  1105.         If Dbl_Sjzj(7) <> 0 Then
  1106.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("014", GridStr(), Szzls)) = Dbl_Sjzj(7) '本期贷方发生.数量
  1107.         End If
  1108.     End If
  1109.     If Bln_EndFlag And Bln_ForeignFlag Then
  1110.         If Dbl_Sjzj(8) <> 0 Then
  1111.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("012", GridStr(), Szzls)) = Dbl_Sjzj(8) '本期借方发生.外币
  1112.         End If
  1113.         If Dbl_Sjzj(9) <> 0 Then
  1114.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("015", GridStr(), Szzls)) = Dbl_Sjzj(9) '本期贷方发生.外币
  1115.         End If
  1116.     End If
  1117.     
  1118.     '将截止累计数据写入网格
  1119.     If Dbl_Sjzj(10) <> 0 Then
  1120.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("017", GridStr(), Szzls)) = Dbl_Sjzj(10)     '累计发生.借方
  1121.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("021", GridStr(), Szzls)) = Dbl_Sjzj(10)     '累计借方发生.金额
  1122.     End If
  1123.     If Dbl_Sjzj(11) <> 0 Then
  1124.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("018", GridStr(), Szzls)) = Dbl_Sjzj(11)     '累计发生.贷方
  1125.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("024", GridStr(), Szzls)) = Dbl_Sjzj(11)     '累计贷方发生.金额
  1126.     End If
  1127.     
  1128.     '仅有末级科目才显示数量,外币
  1129.     If Bln_EndFlag Then
  1130.         If Dbl_Sjzj(12) <> 0 Then
  1131.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("019", GridStr(), Szzls)) = Dbl_Sjzj(12) '累计借方发生.数量
  1132.         End If
  1133.         If Dbl_Sjzj(13) <> 0 Then
  1134.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("022", GridStr(), Szzls)) = Dbl_Sjzj(13) '累计贷方发生.数量
  1135.         End If
  1136.     End If
  1137.     If Bln_EndFlag And Bln_ForeignFlag Then
  1138.         If Dbl_Sjzj(14) <> 0 Then
  1139.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("020", GridStr(), Szzls)) = Dbl_Sjzj(14) '累计借方发生.外币
  1140.         End If
  1141.         If Dbl_Sjzj(15) <> 0 Then
  1142.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("023", GridStr(), Szzls)) = Dbl_Sjzj(15) '累计贷方发生.外币
  1143.         End If
  1144.     End If
  1145.     
  1146.     '将期末数据写入网格
  1147.     If Dbl_Sjzj(16) = 0 Then
  1148.         CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("025", GridStr(), Szzls)) = "平"   '期初方向
  1149.         If Bln_EndFlag And Dbl_Sjzj(17) <> 0 Then
  1150.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("028", GridStr(), Szzls)) = Dbl_Sjzj(17)
  1151.         End If
  1152.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(18) <> 0 Then
  1153.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("029", GridStr(), Szzls)) = Dbl_Sjzj(18)
  1154.         End If
  1155.     Else
  1156.         If Dbl_Sjzj(16) > 0 Then
  1157.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("025", GridStr(), Szzls)) = "借"
  1158.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("026", GridStr(), Szzls)) = Dbl_Sjzj(16)
  1159.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("030", GridStr(), Szzls)) = Dbl_Sjzj(16)
  1160.             If Bln_EndFlag And Dbl_Sjzj(17) <> 0 Then
  1161.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("028", GridStr(), Szzls)) = Dbl_Sjzj(17)
  1162.             End If
  1163.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(18) <> 0 Then
  1164.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("029", GridStr(), Szzls)) = Dbl_Sjzj(18)
  1165.             End If
  1166.         Else
  1167.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("025", GridStr(), Szzls)) = "贷"
  1168.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("027", GridStr(), Szzls)) = -Dbl_Sjzj(16)
  1169.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("030", GridStr(), Szzls)) = -Dbl_Sjzj(16)
  1170.             If Bln_EndFlag And Dbl_Sjzj(17) <> 0 Then
  1171.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("028", GridStr(), Szzls)) = -Dbl_Sjzj(17)
  1172.             End If
  1173.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Sjzj(18) <> 0 Then
  1174.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("029", GridStr(), Szzls)) = -Dbl_Sjzj(18)
  1175.             End If
  1176.         End If
  1177.     End If
  1178. End Sub
  1179. Private Sub Combo_AccFormat_Click()                    '用户选择不同帐页格式
  1180.     Dim Int_Coljsq As Integer         '网格列临时计数器
  1181.     
  1182.     '为了加快显示速度
  1183.     CxbbGrid.Redraw = False
  1184.     
  1185.     For Int_Coljsq = Qslz To CxbbGrid.Cols - 1
  1186.         CxbbGrid.ColHidden(Int_Coljsq) = True
  1187.     Next Int_Coljsq
  1188.     
  1189.     Select Case Combo_AccFormat
  1190.     Case "金额式"
  1191.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '供应商编码
  1192.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '供应商名称
  1193.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '期初余额.借方
  1194.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '期初余额.贷方
  1195.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '本期发生.借方
  1196.         CxbbGrid.ColHidden(Sydz("010", GridStr(), Szzls)) = False      '本期发生.贷方
  1197.         If SzToolbar.Buttons("lj").Value = tbrPressed Then
  1198.             CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '累计发生.借方
  1199.             CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '累计发生.贷方
  1200.         End If
  1201.         CxbbGrid.ColHidden(Sydz("026", GridStr(), Szzls)) = False      '期末余额.借方
  1202.         CxbbGrid.ColHidden(Sydz("027", GridStr(), Szzls)) = False      '期末余额.贷方
  1203.         
  1204.     Case "外币金额式"
  1205.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '供应商编码
  1206.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '供应商名称
  1207.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '方向.方向
  1208.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '期初余额.外币
  1209.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '期初余额.金额
  1210.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '本期借方发生.外币
  1211.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '本期借方发生.金额
  1212.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '本期贷方发生.外币
  1213.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '本期贷方发生.金额
  1214.         If SzToolbar.Buttons("lj").Value = tbrPressed Then
  1215.             CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '累计借方发生.外币
  1216.             CxbbGrid.ColHidden(Sydz("021", GridStr(), Szzls)) = False      '累计借方发生.金额
  1217.             CxbbGrid.ColHidden(Sydz("023", GridStr(), Szzls)) = False      '累计贷方发生.外币
  1218.             CxbbGrid.ColHidden(Sydz("024", GridStr(), Szzls)) = False      '累计贷方发生.金额
  1219.         End If
  1220.         CxbbGrid.ColHidden(Sydz("025", GridStr(), Szzls)) = False      '方向.方向
  1221.         CxbbGrid.ColHidden(Sydz("029", GridStr(), Szzls)) = False      '期末余额.外币
  1222.         CxbbGrid.ColHidden(Sydz("030", GridStr(), Szzls)) = False      '期末余额.金额
  1223.         
  1224.     Case "数量金额式"
  1225.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '供应商编码
  1226.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '供应商名称
  1227.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '方向.方向
  1228.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '期初余额.数量
  1229.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '期初余额.金额
  1230.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '本期借方发生.数量
  1231.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '本期借方发生.金额
  1232.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '本期贷方发生.数量
  1233.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '本期贷方发生.金额
  1234.         If SzToolbar.Buttons("lj").Value = tbrPressed Then
  1235.             CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '累计借方发生.数量
  1236.             CxbbGrid.ColHidden(Sydz("021", GridStr(), Szzls)) = False      '累计借方发生.金额
  1237.             CxbbGrid.ColHidden(Sydz("022", GridStr(), Szzls)) = False      '累计贷方发生.数量
  1238.             CxbbGrid.ColHidden(Sydz("024", GridStr(), Szzls)) = False      '累计贷方发生.金额
  1239.         End If
  1240.         CxbbGrid.ColHidden(Sydz("025", GridStr(), Szzls)) = False      '方向.方向
  1241.         CxbbGrid.ColHidden(Sydz("028", GridStr(), Szzls)) = False      '期末余额.数量
  1242.         CxbbGrid.ColHidden(Sydz("030", GridStr(), Szzls)) = False      '期末余额.金额
  1243.         
  1244.     Case "数量外币式"
  1245.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '供应商编码
  1246.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '供应商名称
  1247.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '方向.方向
  1248.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '期初余额.数量
  1249.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '期初余额.外币
  1250.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '期初余额.金额
  1251.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '本期借方发生.数量
  1252.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '本期借方发生.外币
  1253.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '本期借方发生.金额
  1254.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '本期贷方发生.数量
  1255.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '本期贷方发生.外币
  1256.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '本期贷方发生.金额
  1257.         If SzToolbar.Buttons("lj").Value = tbrPressed Then
  1258.             CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '累计借方发生.数量
  1259.             CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '累计借方发生.外币
  1260.             CxbbGrid.ColHidden(Sydz("021", GridStr(), Szzls)) = False      '累计借方发生.金额
  1261.             CxbbGrid.ColHidden(Sydz("022", GridStr(), Szzls)) = False      '累计贷方发生.数量
  1262.             CxbbGrid.ColHidden(Sydz("023", GridStr(), Szzls)) = False      '累计贷方发生.外币
  1263.             CxbbGrid.ColHidden(Sydz("024", GridStr(), Szzls)) = False      '累计贷方发生.金额
  1264.         End If
  1265.         CxbbGrid.ColHidden(Sydz("025", GridStr(), Szzls)) = False      '方向.方向
  1266.         CxbbGrid.ColHidden(Sydz("028", GridStr(), Szzls)) = False      '期末余额.数量
  1267.         CxbbGrid.ColHidden(Sydz("029", GridStr(), Szzls)) = False      '期末余额.外币
  1268.         CxbbGrid.ColHidden(Sydz("030", GridStr(), Szzls)) = False      '期末余额.金额
  1269.     End Select
  1270.     CxbbGrid.Redraw = True
  1271. End Sub
  1272. Private Sub Combo_FzPxfs_Click()                                    '网格排序方式
  1273.     If Combo_FzPxfs.ListIndex = 0 Then
  1274.         '将网格按编码排序
  1275.         With CxbbGrid
  1276.             .Col = 0
  1277.             CxbbGrid.Sort = flexSortStringAscending
  1278.         End With
  1279.     Else
  1280.         '将网格按名称排序
  1281.         With CxbbGrid
  1282.             .Col = 1
  1283.             CxbbGrid.Sort = flexSortStringAscending
  1284.         End With
  1285.     End If
  1286. End Sub
  1287. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1288.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1289.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1290.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1291.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1292.     ReDim Bbxbt(1 To Bbxbtgs)
  1293.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1294.     If Bbbwhgs <> 0 Then
  1295.         ReDim Bbbwh(1 To Bbbwhgs)
  1296.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1297.     End If
  1298.     Bbzbt = ReportTitle
  1299.     'Bbxbt(1) = Space(2) + "会计期间:" + Lab_TitleText(0)
  1300.     Bbxbt(1) = Space(2) + "会计期间:" + Lab_TitleText(0) + Space(20) + "科目名称:" + Me.Imgebo_FzCcode.Text
  1301.     bbxbtzzxs(1) = 0                                    '报表行组织形式(0-居左 1-居中 2-居右)
  1302.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1303.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1304.     If Not bbylte Then
  1305.         Unload DY_Tybbyldy
  1306.     End If
  1307. End Sub