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

企业管理

开发平台:

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 ZB_FrmKmrjzjg 
  5.    Caption         =   "科目日记帐"
  6.    ClientHeight    =   7755
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11190
  10.    HelpContextID   =   5001
  11.    Icon            =   "帐簿_科目日记帐查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   7755
  16.    ScaleWidth      =   11190
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.CommandButton Cmd_CancelPrint 
  19.       Caption         =   "取消打印(&C)"
  20.       Height          =   405
  21.       Left            =   9060
  22.       TabIndex        =   17
  23.       Top             =   1290
  24.       Visible         =   0   'False
  25.       Width           =   1155
  26.    End
  27.    Begin VB.Timer Timer1 
  28.       Enabled         =   0   'False
  29.       Interval        =   1
  30.       Left            =   7620
  31.       Top             =   90
  32.    End
  33.    Begin VB.PictureBox Pic_Title 
  34.       Height          =   1215
  35.       Left            =   0
  36.       Picture         =   "帐簿_科目日记帐查询结果.frx":1042
  37.       ScaleHeight     =   1155
  38.       ScaleWidth      =   11535
  39.       TabIndex        =   0
  40.       Top             =   570
  41.       Width           =   11595
  42.       Begin VB.ComboBox Combo_AccFormat 
  43.          Height          =   300
  44.          Left            =   6900
  45.          Style           =   2  'Dropdown List
  46.          TabIndex        =   4
  47.          Top             =   780
  48.          Width           =   1725
  49.       End
  50.       Begin MSComctlLib.ImageCombo Imgebo_QueryCode 
  51.          Height          =   315
  52.          Left            =   2010
  53.          TabIndex        =   16
  54.          Top             =   780
  55.          Width           =   3885
  56.          _ExtentX        =   6853
  57.          _ExtentY        =   556
  58.          _Version        =   393216
  59.          ForeColor       =   -2147483640
  60.          BackColor       =   -2147483643
  61.          Locked          =   -1  'True
  62.       End
  63.       Begin VB.Label Label1 
  64.          Appearance      =   0  'Flat
  65.          BackColor       =   &H80000005&
  66.          BackStyle       =   0  'Transparent
  67.          Caption         =   "承前页"
  68.          ForeColor       =   &H80000008&
  69.          Height          =   195
  70.          Index           =   1
  71.          Left            =   9150
  72.          TabIndex        =   15
  73.          Top             =   300
  74.          Width           =   615
  75.       End
  76.       Begin VB.Label Lab_Color 
  77.          Appearance      =   0  'Flat
  78.          BackColor       =   &H00E9F4FA&
  79.          BorderStyle     =   1  'Fixed Single
  80.          ForeColor       =   &H80000008&
  81.          Height          =   195
  82.          Index           =   2
  83.          Left            =   8910
  84.          TabIndex        =   14
  85.          Top             =   300
  86.          Width           =   195
  87.       End
  88.       Begin VB.Label Label1 
  89.          Appearance      =   0  'Flat
  90.          BackColor       =   &H80000005&
  91.          BackStyle       =   0  'Transparent
  92.          Caption         =   "过次页"
  93.          ForeColor       =   &H80000008&
  94.          Height          =   195
  95.          Index           =   0
  96.          Left            =   8220
  97.          TabIndex        =   13
  98.          Top             =   300
  99.          Width           =   615
  100.       End
  101.       Begin VB.Label Lab_Color 
  102.          Appearance      =   0  'Flat
  103.          BackColor       =   &H00DFDFDF&
  104.          BorderStyle     =   1  'Fixed Single
  105.          ForeColor       =   &H80000008&
  106.          Height          =   195
  107.          Index           =   1
  108.          Left            =   7980
  109.          TabIndex        =   12
  110.          Top             =   300
  111.          Width           =   195
  112.       End
  113.       Begin VB.Label Lab_TitleText 
  114.          BackStyle       =   0  'Transparent
  115.          ForeColor       =   &H00000000&
  116.          Height          =   225
  117.          Index           =   1
  118.          Left            =   4380
  119.          TabIndex        =   11
  120.          Top             =   300
  121.          Width           =   1395
  122.       End
  123.       Begin VB.Label Lab_TitleMess 
  124.          BackStyle       =   0  'Transparent
  125.          Caption         =   "外币名称:"
  126.          Height          =   225
  127.          Index           =   2
  128.          Left            =   3450
  129.          TabIndex        =   10
  130.          Top             =   300
  131.          Visible         =   0   'False
  132.          Width           =   915
  133.       End
  134.       Begin VB.Label Lab_TitleMess 
  135.          AutoSize        =   -1  'True
  136.          BackStyle       =   0  'Transparent
  137.          Caption         =   "科目名称:"
  138.          Height          =   180
  139.          Index           =   1
  140.          Left            =   1170
  141.          TabIndex        =   9
  142.          Top             =   840
  143.          Width           =   810
  144.       End
  145.       Begin VB.Label Label1 
  146.          Appearance      =   0  'Flat
  147.          BackColor       =   &H80000005&
  148.          BackStyle       =   0  'Transparent
  149.          Caption         =   "未记帐明细会计分录"
  150.          ForeColor       =   &H80000008&
  151.          Height          =   195
  152.          Index           =   2
  153.          Left            =   6240
  154.          TabIndex        =   7
  155.          Top             =   300
  156.          Width           =   1665
  157.       End
  158.       Begin VB.Label Lab_Color 
  159.          Appearance      =   0  'Flat
  160.          BackColor       =   &H00FFFFC0&
  161.          BorderStyle     =   1  'Fixed Single
  162.          ForeColor       =   &H80000008&
  163.          Height          =   195
  164.          Index           =   0
  165.          Left            =   6000
  166.          TabIndex        =   6
  167.          Top             =   300
  168.          Width           =   195
  169.       End
  170.       Begin VB.Label TsLabel 
  171.          AutoSize        =   -1  'True
  172.          BackStyle       =   0  'Transparent
  173.          Caption         =   "帐页格式:"
  174.          Height          =   180
  175.          Index           =   7
  176.          Left            =   6090
  177.          TabIndex        =   5
  178.          Top             =   840
  179.          Width           =   810
  180.       End
  181.       Begin VB.Label TsLabel 
  182.          BackColor       =   &H80000018&
  183.          BackStyle       =   0  'Transparent
  184.          Caption         =   "科目日记帐"
  185.          BeginProperty Font 
  186.             Name            =   "宋体"
  187.             Size            =   14.25
  188.             Charset         =   134
  189.             Weight          =   700
  190.             Underline       =   0   'False
  191.             Italic          =   0   'False
  192.             Strikethrough   =   0   'False
  193.          EndProperty
  194.          ForeColor       =   &H00000000&
  195.          Height          =   330
  196.          Index           =   4
  197.          Left            =   750
  198.          TabIndex        =   1
  199.          Top             =   180
  200.          Width           =   1695
  201.       End
  202.    End
  203.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  204.       Height          =   6885
  205.       Left            =   30
  206.       TabIndex        =   2
  207.       Top             =   1800
  208.       Width           =   11715
  209.       _cx             =   5080
  210.       _cy             =   5080
  211.       Appearance      =   1
  212.       BorderStyle     =   1
  213.       Enabled         =   -1  'True
  214.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  215.          Name            =   "宋体"
  216.          Size            =   9
  217.          Charset         =   134
  218.          Weight          =   400
  219.          Underline       =   0   'False
  220.          Italic          =   0   'False
  221.          Strikethrough   =   0   'False
  222.       EndProperty
  223.       MousePointer    =   0
  224.       BackColor       =   16777215
  225.       ForeColor       =   -2147483640
  226.       BackColorFixed  =   12632256
  227.       ForeColorFixed  =   -2147483630
  228.       BackColorSel    =   -2147483635
  229.       ForeColorSel    =   -2147483634
  230.       BackColorBkg    =   -2147483636
  231.       BackColorAlternate=   16777215
  232.       GridColor       =   -2147483633
  233.       GridColorFixed  =   -2147483632
  234.       TreeColor       =   -2147483632
  235.       FloodColor      =   192
  236.       SheetBorder     =   -2147483642
  237.       FocusRect       =   1
  238.       HighLight       =   1
  239.       AllowSelection  =   -1  'True
  240.       AllowBigSelection=   -1  'True
  241.       AllowUserResizing=   0
  242.       SelectionMode   =   0
  243.       GridLines       =   1
  244.       GridLinesFixed  =   2
  245.       GridLineWidth   =   1
  246.       Rows            =   50
  247.       Cols            =   10
  248.       FixedRows       =   1
  249.       FixedCols       =   1
  250.       RowHeightMin    =   0
  251.       RowHeightMax    =   0
  252.       ColWidthMin     =   0
  253.       ColWidthMax     =   0
  254.       ExtendLastCol   =   0   'False
  255.       FormatString    =   ""
  256.       ScrollTrack     =   0   'False
  257.       ScrollBars      =   3
  258.       ScrollTips      =   0   'False
  259.       MergeCells      =   0
  260.       MergeCompare    =   0
  261.       AutoResize      =   -1  'True
  262.       AutoSizeMode    =   0
  263.       AutoSearch      =   0
  264.       AutoSearchDelay =   2
  265.       MultiTotals     =   -1  'True
  266.       SubtotalPosition=   1
  267.       OutlineBar      =   0
  268.       OutlineCol      =   0
  269.       Ellipsis        =   0
  270.       ExplorerBar     =   0
  271.       PicturesOver    =   0   'False
  272.       FillStyle       =   0
  273.       RightToLeft     =   0   'False
  274.       PictureType     =   0
  275.       TabBehavior     =   0
  276.       OwnerDraw       =   0
  277.       Editable        =   0
  278.       ShowComboButton =   1
  279.       WordWrap        =   0   'False
  280.       TextStyle       =   0
  281.       TextStyleFixed  =   0
  282.       OleDragMode     =   0
  283.       OleDropMode     =   0
  284.       DataMode        =   0
  285.       VirtualData     =   -1  'True
  286.       DataMember      =   ""
  287.       ComboSearch     =   3
  288.       AutoSizeMouse   =   -1  'True
  289.       FrozenRows      =   0
  290.       FrozenCols      =   0
  291.       AllowUserFreezing=   0
  292.       BackColorFrozen =   0
  293.       ForeColorFrozen =   0
  294.       WallPaperAlignment=   9
  295.       AccessibleName  =   ""
  296.       AccessibleDescription=   ""
  297.       AccessibleValue =   ""
  298.       AccessibleRole  =   24
  299.    End
  300.    Begin MSComctlLib.Toolbar SzToolbar 
  301.       Align           =   1  'Align Top
  302.       Height          =   555
  303.       Left            =   0
  304.       TabIndex        =   3
  305.       Top             =   0
  306.       Width           =   11190
  307.       _ExtentX        =   19738
  308.       _ExtentY        =   979
  309.       ButtonWidth     =   820
  310.       ButtonHeight    =   926
  311.       AllowCustomize  =   0   'False
  312.       Appearance      =   1
  313.       Style           =   1
  314.       ImageList       =   "ImageList1"
  315.       _Version        =   393216
  316.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  317.          NumButtons      =   12
  318.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  319.             Caption         =   "设置"
  320.             Key             =   "ymsz"
  321.             ImageKey        =   "sz"
  322.          EndProperty
  323.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  324.             Caption         =   "打印"
  325.             Key             =   "dy"
  326.             ImageKey        =   "dy"
  327.          EndProperty
  328.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  329.             Caption         =   "预览"
  330.             Key             =   "yl"
  331.             ImageKey        =   "yl"
  332.          EndProperty
  333.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  334.             Caption         =   "连打"
  335.             Key             =   "lxdy"
  336.             ImageKey        =   "lxdy"
  337.          EndProperty
  338.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  339.             Style           =   3
  340.          EndProperty
  341.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  342.             Caption         =   "查询"
  343.             Key             =   "cx"
  344.             ImageKey        =   "cx"
  345.          EndProperty
  346.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  347.             Style           =   3
  348.          EndProperty
  349.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  350.             Caption         =   "凭证"
  351.             Key             =   "pz"
  352.             ImageKey        =   "pz"
  353.          EndProperty
  354.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  355.             Caption         =   "总帐"
  356.             Key             =   "zz"
  357.             ImageKey        =   "zz"
  358.          EndProperty
  359.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  360.             Style           =   3
  361.          EndProperty
  362.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  363.             Caption         =   "帮助"
  364.             Key             =   "bz"
  365.             ImageKey        =   "bz"
  366.          EndProperty
  367.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  368.             Caption         =   "退出"
  369.             Key             =   "fh"
  370.             ImageKey        =   "tc"
  371.          EndProperty
  372.       EndProperty
  373.       BorderStyle     =   1
  374.       Begin MSComctlLib.ImageList ImageList1 
  375.          Left            =   5400
  376.          Top             =   0
  377.          _ExtentX        =   1005
  378.          _ExtentY        =   1005
  379.          BackColor       =   -2147483643
  380.          ImageWidth      =   16
  381.          ImageHeight     =   16
  382.          MaskColor       =   12632256
  383.          _Version        =   393216
  384.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  385.             NumListImages   =   34
  386.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  387.                Picture         =   "帐簿_科目日记帐查询结果.frx":35106
  388.                Key             =   "sz"
  389.             EndProperty
  390.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  391.                Picture         =   "帐簿_科目日记帐查询结果.frx":354A0
  392.                Key             =   "dy"
  393.             EndProperty
  394.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  395.                Picture         =   "帐簿_科目日记帐查询结果.frx":3583A
  396.                Key             =   "yl"
  397.             EndProperty
  398.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  399.                Picture         =   "帐簿_科目日记帐查询结果.frx":35BD4
  400.                Key             =   "xg"
  401.             EndProperty
  402.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  403.                Picture         =   "帐簿_科目日记帐查询结果.frx":35F6E
  404.                Key             =   "zh"
  405.             EndProperty
  406.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  407.                Picture         =   "帐簿_科目日记帐查询结果.frx":36308
  408.                Key             =   "sh"
  409.             EndProperty
  410.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  411.                Picture         =   "帐簿_科目日记帐查询结果.frx":366A2
  412.                Key             =   "bc"
  413.             EndProperty
  414.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  415.                Picture         =   "帐簿_科目日记帐查询结果.frx":36A3C
  416.                Key             =   "fq"
  417.             EndProperty
  418.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  419.                Picture         =   "帐簿_科目日记帐查询结果.frx":36DD6
  420.                Key             =   "bz"
  421.             EndProperty
  422.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  423.                Picture         =   "帐簿_科目日记帐查询结果.frx":37170
  424.                Key             =   "tc"
  425.             EndProperty
  426.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  427.                Picture         =   "帐簿_科目日记帐查询结果.frx":3750A
  428.                Key             =   "bcgs"
  429.             EndProperty
  430.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  431.                Picture         =   "帐簿_科目日记帐查询结果.frx":378A4
  432.                Key             =   "mrlk"
  433.             EndProperty
  434.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  435.                Picture         =   "帐簿_科目日记帐查询结果.frx":37C3E
  436.                Key             =   "xsxm"
  437.             EndProperty
  438.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  439.                Picture         =   "帐簿_科目日记帐查询结果.frx":37FD8
  440.                Key             =   "first"
  441.             EndProperty
  442.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  443.                Picture         =   "帐簿_科目日记帐查询结果.frx":38372
  444.                Key             =   "prev"
  445.             EndProperty
  446.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.                Picture         =   "帐簿_科目日记帐查询结果.frx":3870C
  448.                Key             =   "next"
  449.             EndProperty
  450.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.                Picture         =   "帐簿_科目日记帐查询结果.frx":38AA6
  452.                Key             =   "last"
  453.             EndProperty
  454.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.                Picture         =   "帐簿_科目日记帐查询结果.frx":38E40
  456.                Key             =   "xx"
  457.             EndProperty
  458.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.                Picture         =   "帐簿_科目日记帐查询结果.frx":391DA
  460.                Key             =   "define"
  461.             EndProperty
  462.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.                Picture         =   "帐簿_科目日记帐查询结果.frx":39574
  464.                Key             =   "exec"
  465.             EndProperty
  466.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                Picture         =   "帐簿_科目日记帐查询结果.frx":3990E
  468.                Key             =   "xz"
  469.             EndProperty
  470.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                Picture         =   "帐簿_科目日记帐查询结果.frx":39CA8
  472.                Key             =   "sc"
  473.             EndProperty
  474.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                Picture         =   "帐簿_科目日记帐查询结果.frx":3A042
  476.                Key             =   "sx"
  477.             EndProperty
  478.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "帐簿_科目日记帐查询结果.frx":3A3DC
  480.                Key             =   "cx"
  481.             EndProperty
  482.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "帐簿_科目日记帐查询结果.frx":3A776
  484.                Key             =   "zd"
  485.             EndProperty
  486.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "帐簿_科目日记帐查询结果.frx":3AB10
  488.                Key             =   "dz"
  489.             EndProperty
  490.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "帐簿_科目日记帐查询结果.frx":3AEAA
  492.                Key             =   "ph"
  493.             EndProperty
  494.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "帐簿_科目日记帐查询结果.frx":3B244
  496.                Key             =   "fz"
  497.             EndProperty
  498.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "帐簿_科目日记帐查询结果.frx":3B5DE
  500.                Key             =   "dw"
  501.             EndProperty
  502.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                Picture         =   "帐簿_科目日记帐查询结果.frx":3B978
  504.                Key             =   "hf"
  505.             EndProperty
  506.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                Picture         =   "帐簿_科目日记帐查询结果.frx":3BD12
  508.                Key             =   "pz"
  509.             EndProperty
  510.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                Picture         =   "帐簿_科目日记帐查询结果.frx":3C0AC
  512.                Key             =   "check"
  513.             EndProperty
  514.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.                Picture         =   "帐簿_科目日记帐查询结果.frx":3C446
  516.                Key             =   "zz"
  517.             EndProperty
  518.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.                Picture         =   "帐簿_科目日记帐查询结果.frx":3C7E0
  520.                Key             =   "lxdy"
  521.             EndProperty
  522.          EndProperty
  523.       End
  524.       Begin MSComctlLib.Toolbar GsToolbar 
  525.          Height          =   525
  526.          Left            =   9510
  527.          TabIndex        =   8
  528.          Top             =   0
  529.          Width           =   1665
  530.          _ExtentX        =   2937
  531.          _ExtentY        =   926
  532.          ButtonWidth     =   1455
  533.          ButtonHeight    =   926
  534.          AllowCustomize  =   0   'False
  535.          Appearance      =   1
  536.          Style           =   1
  537.          ImageList       =   "ImageList1"
  538.          _Version        =   393216
  539.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  540.             NumButtons      =   2
  541.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  542.                Caption         =   "保存格式"
  543.                Key             =   "bcgs"
  544.                ImageKey        =   "bcgs"
  545.             EndProperty
  546.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  547.                Caption         =   "默认列宽"
  548.                Key             =   "hfmrgs"
  549.                ImageKey        =   "mrlk"
  550.             EndProperty
  551.          EndProperty
  552.       End
  553.    End
  554. End
  555. Attribute VB_Name = "ZB_FrmKmrjzjg"
  556. Attribute VB_GlobalNameSpace = False
  557. Attribute VB_Creatable = False
  558. Attribute VB_PredeclaredId = True
  559. Attribute VB_Exposed = False
  560. '***************************************************************************
  561. '*    模 块 名 称 :科目日记帐
  562. '*    功 能 描 述 :本功能用于查询某科目在某月或某几月的明细帐情况或某
  563. '*                 日期范围内的明细帐情况并且能够进行立体联查凭证及总帐数据。
  564. '*    程序员姓名  : 张建忠
  565. '*    最后修改人  : 奚俊峰
  566. '*    最后修改时间: 2001-12-30
  567. '*    备        注:查询科目明细帐时应从建帐启用月份查询,否则本年累计数据
  568. '*                 有问题,有的软件控制不能小于启用月份查询.
  569. '***************************************************************************
  570. Dim ReportTitle As String                '报表主标题
  571. Dim Bln_ClassSum As Boolean              '是否进行科目类别合计
  572. Dim Bln_ConVertFlag As Boolean           '外币折算方式
  573. Dim Int_Wbhlxsws As Integer              '外币汇率小数位数
  574. Dim Bln_CancelPrint As Boolean           '用户是否取消打印
  575. Dim Bln_Printing As Boolean              '用户是否正在打印
  576. '以下为固定使用变量
  577. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  578. Dim GridCode As String                   '显示网格网格代码
  579. Dim GridInf() As Variant                 '整个网格设置信息
  580. Dim Tsxx As String                       '系统提示信息
  581. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  582. Dim Sjhgd As Double                      '网格数据行高度
  583. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  584. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  585. Dim GridStr()  As String                 '网格列信息(字符型)
  586. Dim GridInt() As Integer                 '网格列信息(整型)
  587. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  588. Dim Bln_Stop As Boolean                  '停止输出查询结果
  589. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  590.     On Error Resume Next
  591.     With CxbbGrid
  592.         .Width = Me.Width - 160
  593.         .Height = Me.Height - .Top - 400
  594.     End With
  595.     With Pic_Title
  596.         .Width = Me.Width - 160
  597.     End With
  598.     
  599.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  600. End Sub
  601. Private Sub Form_Load()                                                   '窗体装入
  602.     
  603.     '调入打印页面设置窗体
  604.     XtReportCode = "Cwzz_rjzcx"
  605.     Load Dyymctbl
  606.     ReportTitle = "日  记  帐"
  607.     
  608.     '调整标题栏及网格、格式工具条位置
  609.     Pic_Title.Left = 40
  610.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  611.     CxbbGrid.Left = Pic_Title.Left
  612.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  613.     
  614.     '调 入 网 格
  615.     GridCode = "Cwzz_rjzcx"
  616.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  617.     
  618.     Qslz = GridInf(1)
  619.     Sjhgd = GridInf(2)
  620.     Sfxshjwg = GridInf(7)
  621.     Szzls = CxbbGrid.Cols - 1
  622.     
  623.     '帐页格式
  624.     Call FillCombo(Combo_AccFormat, "Cwzz_zygs", "", 0)
  625.     
  626.     '调整标题位置
  627.     SetTitlePos tsLabel(4)
  628.     
  629.     
  630. End Sub
  631. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  632.     '如果用户正在连续打印帐页,则不能关闭窗体
  633.     If Bln_Printing Then
  634.         Cancel = 1
  635.     End If
  636.     '卸载条件窗体
  637.     ZB_FrmKmrjztj.UnloadCheck.Value = 1
  638.     Unload ZB_FrmKmrjztj
  639.     '卸载打印页面设置窗体
  640.     Unload Dyymctbl
  641. End Sub
  642. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  643.     Select Case Button.Key
  644.     Case "bcgs"                                          '保存表格格式
  645.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  646.     Case "hfmrgs"                                        '恢复默认格式
  647.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  648.     Case "szxsxm"                                        '设置显示项目
  649.         Call Szxsxm(CxbbGrid, GridCode)
  650.     End Select
  651. End Sub
  652. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  653.     Select Case Button.Key
  654.     Case "ymsz"                                          '页面设置
  655.         Dyymctbl.Show 1
  656.     Case "yl"                                            '预 览
  657.         Call bbyl(True)
  658.     Case "dy"                                            '打 印
  659.         Call bbyl(False)
  660.     Case "lxdy"                                          '连 打
  661.         Call Sub_Lxdy
  662.     Case "cx"                                            '查 询
  663.         ZB_FrmKmrjztj.Show 1
  664.     Case "pz"                                            '凭 证
  665.         Call CxbbGrid_DblClick
  666.     Case "zz"                                            '总 帐
  667.         Call Sub_LcZflz
  668.     Case "bz"                                            '帮 助
  669.         Call F1bz
  670.     Case "fh"                                            '退 出
  671.         Unload Me
  672.     End Select
  673. End Sub
  674. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  675.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  676.     Dim Str_QueryCondi As String                '用户录入查询条件
  677.     
  678.     Timer1.Enabled = False
  679.     
  680.     '日记帐科目
  681.     Call FillImageCombo(Imgebo_QueryCode, "cwzz_Rjzcx", 0)
  682.     For Jsqte = 1 To Imgebo_QueryCode.ComboItems.count
  683.         If Imgebo_QueryCode.ComboItems.Item(Jsqte).Text = ZB_FrmKmrjztj.Imgebo_Rjz.Text Then
  684.             Imgebo_QueryCode.ComboItems.Item(Jsqte).Selected = True
  685.             Imgebo_QueryCode.Refresh
  686.             Exit For
  687.         End If
  688.     Next Jsqte
  689.     
  690.     Call Imgebo_QueryCode_Click
  691. End Sub
  692. Private Sub Imgebo_QueryCode_Click()                                    '用户点击科目列表框
  693.     Timer1.Enabled = False
  694.     Xt_Wait.Show
  695.     Xt_Wait.Refresh
  696.     
  697.     '加快显示速度
  698.     CxbbGrid.Redraw = False
  699.     
  700.     '生成查询结果
  701.     Call Sub_Query
  702.     
  703.     CxbbGrid.Redraw = True
  704.     
  705.     Xt_Wait.Hide
  706. End Sub
  707. Private Sub Sub_Query()                                    '生成查询结果
  708.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  709.     Dim Sqlstr As String                        '查询字符串
  710.     Dim Coljsq As Long                          '网格列计数器
  711.     Dim Jsqte As Long                           '临时动态计数器
  712.     Dim Str_Ccode As String                     '查询会计科目
  713.     Dim Int_BPeriod As Integer                  '查询起始会计期间
  714.     Dim Int_EPeriod As Integer                  '查询终止会计期间
  715.     Dim Int_Year As Integer                     '查询会计年度
  716.     Dim Dtm_BeginDay As Date                    '查询起始日期
  717.     Dim Dtm_EndDay As Date                      '查询终止日期
  718.     Dim Dtm_DqDay As Date                       '查询当前日期
  719.     Dim Bln_QueryDay As Boolean                 '是否按日查询
  720.     Dim Bln_IncluNotBook As Boolean             '是否包含未记帐凭证
  721.     Dim Bln_QcZeroShow As Boolean               '查询会计期间期初数据如果为零是否显示
  722.     Dim Bln_CqGcShow As Boolean                 '是否显示承前过次
  723.     Dim Int_Zdzyhs As Integer                   '正式帐页指定报表行数
  724.     Dim Bln_EndFlag As Boolean                  '判断当前科目是否为末级科目
  725.     Dim Int_DqPeriod As Integer                 '查询进行当前会计期间
  726.     Dim Bln_NotFirst As Boolean                 '是否为首次循环
  727.     Dim Bln_ForeignFlag As Boolean              '判断此科目是否外币核算
  728.     Dim Lng_DayCount As Long                    '本日明细帐记录条数
  729.     Dim Lng_MonthCount As Long                  '本月明细帐记录条数
  730.     Dim Lng_YearCount As Long                   '本年明细帐记录条数
  731.     
  732.     Dim Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#   '期初金额,数量,外币
  733.     Dim Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj# '本期合计(金额,数量,外币)
  734.     Dim Dbl_DayJejfhj#, Dbl_DayJedfhj#, Dbl_DaySljfhj#, Dbl_DaySldfhj#, Dbl_DayWbjfhj#, Dbl_DayWbdfhj#  '本日合计(金额,数量,外币)
  735.     Dim Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj# '截止累计(金额,数量,外币)
  736.     Dim Dbl_Qmyete#, Dbl_Qmslte#, Dbl_Qmwbte#   '期末金额,数量,外币
  737.     '以下为用户自定义部分[
  738.     
  739.     '清除原查询数据
  740.     CxbbGrid.Rows = CxbbGrid.FixedRows
  741.     
  742.     If Imgebo_QueryCode.ComboItems.count = 0 Then
  743.         Exit Sub
  744.     End If
  745.     
  746.     '得到当前查询科目,并判断是否为末级科目
  747.     Str_Ccode = GetComboKey(Imgebo_QueryCode, 0)
  748.     Sqlstr = "SELECT EndFlag,AccFormat,ForeignFlag,ForeignCurrName,IDec,ConVertFlag From Cwzz_AccCode Left JOIN Gy_ForeignCurrency ON" & _
  749.     " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode Where Ccode='" & Str_Ccode & "'"
  750.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  751.     If Not RecTemp.EOF Then
  752.         Bln_EndFlag = RecTemp.Fields("EndFlag")
  753.         Combo_AccFormat.Text = Trim(RecTemp.Fields("AccFormat") & "")
  754.         If RecTemp.Fields("ForeignFlag") Then
  755.             Bln_ForeignFlag = True
  756.             Lab_TitleMess(2).Visible = True
  757.             Lab_TitleText(1).Caption = Trim(RecTemp.Fields("ForeignCurrName") & "")
  758.             Bln_ConVertFlag = IIf(IsNull(RecTemp.Fields("ConVertFlag")), False, RecTemp.Fields("ConVertFlag"))
  759.             Int_Wbhlxsws = RecTemp.Fields("IDec")
  760.         Else
  761.             Bln_ForeignFlag = False
  762.             Lab_TitleMess(2).Visible = False
  763.             Lab_TitleText(1).Caption = ""
  764.         End If
  765.     End If
  766.     
  767.     '得到查询起始和截止会计期间,并判断是否包含未记帐凭证
  768.     With ZB_FrmKmrjztj
  769.         
  770.         '是否包含未记帐凭证
  771.         If .Chk_NotBook.Value = 1 Then
  772.             Bln_IncluNotBook = True
  773.         Else
  774.             Bln_IncluNotBook = False
  775.         End If
  776.         
  777.         '查询会计期间期初数据如果为零是否显示
  778.         If .Chk_QcZeroShow = 1 Then
  779.             Bln_QcZeroShow = True
  780.         Else
  781.             Bln_QcZeroShow = False
  782.         End If
  783.         
  784.         '判断是按月查询还是按日查询
  785.         If .Opt_MouthDay(1).Value = True Then
  786.             Bln_QueryDay = True
  787.             Dtm_BeginDay = CDate(.LrText(0).Text)
  788.             Dtm_EndDay = CDate(.LrText(1).Text)
  789.         Else
  790.             Bln_QueryDay = False
  791.         End If
  792.         
  793.         '根据不同的查询方式得到不同的查询年度,起始会计期间,终止会计期间
  794.         If Not Bln_QueryDay Then
  795.             Int_Year = Int(Mid(.Combo_Kjqj(0).Text, 1, 4))
  796.             Int_BPeriod = Int(Mid(.Combo_Kjqj(0).Text, 6, 2))
  797.             Int_EPeriod = Int(Mid(.Combo_Kjqj(1).Text, 6, 2))
  798.         Else
  799.             Int_Year = Int(Mid(.LrText(0).Text, 1, 4))
  800.             Sqlstr = "Select period From gy_kjrlb where qsrq<='" & .LrText(0).Text & "' and zzrq>='" & .LrText(0).Text + "'"
  801.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  802.             If Not RecTemp.EOF Then
  803.                 Int_BPeriod = RecTemp.Fields("period")
  804.             End If
  805.             Sqlstr = "Select period From gy_kjrlb where qsrq<='" & .LrText(1).Text & "' and zzrq>='" & .LrText(1).Text + "'"
  806.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  807.             If Not RecTemp.EOF Then
  808.                 Int_EPeriod = RecTemp.Fields("period")
  809.             End If
  810.         End If
  811.         
  812.         '是否显示承前过次,如显示则将页面设置指定行数控制为>1且必须指定报表行数打印输出
  813.         If .Chk_CqGcShow = 1 Then
  814.             Bln_CqGcShow = True
  815.             Dyymctbl.ZdhsCheck.Enabled = False
  816.             Dyymctbl.ZdhsCheck.Value = 1
  817.             Dyymctbl.BbhsText.Enabled = False
  818.             Dyymctbl.BbhsVScroll.Enabled = False
  819.             Dyymctbl.BbhsText.Text = .LrText(2).Text
  820.         Else
  821.             Bln_CqGcShow = False
  822.             Dyymctbl.ZdhsCheck.Enabled = True
  823.             Dyymctbl.BbhsText.Enabled = True
  824.             Dyymctbl.BbhsVScroll.Enabled = True
  825.         End If
  826.         Int_Zdzyhs = Val(.LrText(2).Text)
  827.         
  828.     End With
  829.     
  830.     '初始化各种值
  831.     Dbl_Qcyete = 0
  832.     Dbl_Qcslte = 0
  833.     Dbl_Qcwbte = 0
  834.     
  835.     DayDbl_Jejfhj = 0
  836.     DayDbl_Jedfhj = 0
  837.     DayDbl_Sljfhj = 0
  838.     DayDbl_Sldfhj = 0
  839.     DayDbl_Wbjfhj = 0
  840.     DayDbl_Wbdfhj = 0
  841.     
  842.     Dbl_Jejfhj = 0
  843.     Dbl_Jedfhj = 0
  844.     Dbl_Sljfhj = 0
  845.     Dbl_Sldfhj = 0
  846.     Dbl_Wbjfhj = 0
  847.     Dbl_Wbdfhj = 0
  848.     
  849.     Dbl_Jejflj = 0
  850.     Dbl_Jedflj = 0
  851.     Dbl_Sljflj = 0
  852.     Dbl_Sldflj = 0
  853.     Dbl_Wbjflj = 0
  854.     Dbl_Wbdflj = 0
  855.     
  856.     Lng_DayCount = 0
  857.     Lng_MonthCount = 0
  858.     Lng_YearCount = 0
  859.     
  860.     Jsqte = CxbbGrid.FixedRows - 1
  861.     
  862.     '1.计算期初余额(金额,数量,外币),并计算截止查询起始会计期间累计数据
  863.     Sqlstr = "SELECT * From Cwzz_AccSum Where Ccode='" & Str_Ccode & "' And Year=" & Int_Year & _
  864.     " And Period=" & Int_BPeriod
  865.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  866.     If Not RecTemp.EOF Then
  867.         Dbl_Qcyete = RecTemp.Fields("Qcye")
  868.         Dbl_Qcslte = RecTemp.Fields("Qcsl")
  869.         Dbl_Qcwbte = RecTemp.Fields("Qcwb")
  870.         
  871.         '截止累计数据需要减掉本会计期间相应记帐数据
  872.         Dbl_Jejflj = RecTemp.Fields("Byjfljje") - RecTemp.Fields("Mjje")
  873.         Dbl_Jedflj = RecTemp.Fields("Bydfljje") - RecTemp.Fields("Mdje")
  874.         Dbl_Sljflj = RecTemp.Fields("Byjfljsl") - RecTemp.Fields("Mjsl")
  875.         Dbl_Sldflj = RecTemp.Fields("Bydfljsl") - RecTemp.Fields("Mdsl")
  876.         Dbl_Wbjflj = RecTemp.Fields("Byjfljwb") - RecTemp.Fields("Mjwb")
  877.         Dbl_Wbdflj = RecTemp.Fields("Bydfljwb") - RecTemp.Fields("Mdwb")
  878.     End If
  879.     
  880.     '如果包含未记帐凭证则计算小于查询起始会计期间包含科目借贷方合计
  881.     If Bln_IncluNotBook Then
  882.         Sqlstr = "SELECT Sum(Jfje) as Jfjehj,Sum(Dfje) as Dfjehj,Sum(Jfsl) as Jfslhj,Sum(Dfsl) as Dfslhj" & _
  883.         ",Sum(Wbjfje) as Wbjfjehj,Sum(Wbdfje) as Wbdfjehj From Cwzz_V_AccVouch Where BookFlag=0 And Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & _
  884.         " And Period<" & Int_BPeriod
  885.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  886.         If Not RecTemp.EOF Then
  887.             Dbl_Qcyete = Dbl_Qcyete + Val(RecTemp.Fields("Jfjehj") & "") - Val(RecTemp.Fields("Dfjehj") & "")
  888.             Dbl_Qcslte = Dbl_Qcslte + Val(RecTemp.Fields("Jfslhj") & "") - Val(RecTemp.Fields("Dfslhj") & "")
  889.             Dbl_Qcwbte = Dbl_Qcwbte + Val(RecTemp.Fields("Wbjfjehj") & "") - Val(RecTemp.Fields("Wbdfjehj") & "")
  890.             
  891.             '计算相应截止查询起始会计期间累计数据
  892.             Dbl_Jejflj = Dbl_Jejflj + Val(RecTemp.Fields("Jfjehj") & "")
  893.             Dbl_Jedflj = Dbl_Jedflj + Val(RecTemp.Fields("Dfjehj") & "")
  894.             Dbl_Sljflj = Dbl_Sljflj + Val(RecTemp.Fields("Jfslhj") & "")
  895.             Dbl_Sldflj = Dbl_Sldflj + Val(RecTemp.Fields("Dfslhj") & "")
  896.             Dbl_Wbjflj = Dbl_Wbjflj + Val(RecTemp.Fields("Wbjfjehj") & "")
  897.             Dbl_Wbdflj = Dbl_Wbdflj + Val(RecTemp.Fields("Wbdfjehj") & "")
  898.         End If
  899.     End If
  900.     
  901.     
  902.     '判断按月查询还是按日查询分别作不同的处理(按月查询输出期初余额,而按日合计则输出昨日余额)
  903.     If Not Bln_QueryDay Then
  904.         If (Dbl_Qcyete <> 0 Or (Bln_EndFlag And (Dbl_Qcslte <> 0 Or Dbl_Qcwbte <> 0))) Or Bln_QcZeroShow Then    '如果期初数据为零,且用户选择不输出则不显示此行数据
  905.             CxbbGrid.AddItem ""
  906.             Jsqte = Jsqte + 1
  907.             
  908.             '将期初数据写入网格(第1会计期间为上年结转,其余会计期间为期初余额)
  909.             If Int_BPeriod = 1 Then
  910.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "上年结转"
  911.             Else
  912.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "期初余额"
  913.             End If
  914.             
  915.             '输出余额
  916.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  917.         End If
  918.     Else
  919.         
  920.         '计算昨日余额
  921.         If Bln_IncluNotBook Then   '判断是否包含未记帐凭证
  922.             Sqlstr = "SELECT Sum(Jfje) as Jfjehj,Sum(Dfje) as Dfjehj,Sum(Jfsl) as Jfslhj,Sum(Dfsl) as Dfslhj" & _
  923.             ",Sum(Wbjfje) as Wbjfjehj,Sum(Wbdfje) as Wbdfjehj From Cwzz_V_AccVouch Where Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & _
  924.             " And Period>=" & Int_BPeriod & " And DDate<'" & Dtm_BeginDay & "'"
  925.         Else
  926.             Sqlstr = "SELECT Sum(Jfje) as Jfjehj,Sum(Dfje) as Dfjehj,Sum(Jfsl) as Jfslhj,Sum(Dfsl) as Dfslhj" & _
  927.             ",Sum(Wbjfje) as Wbjfjehj,Sum(Wbdfje) as Wbdfjehj From Cwzz_V_AccVouch Where BookFlag='1' And Ccode like '" & Str_Ccode & "%' And Year=" & Int_Year & _
  928.             " And Period>=" & Int_BPeriod & " And DDate<'" & Dtm_BeginDay & "'"
  929.         End If
  930.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  931.         If Not RecTemp.EOF Then
  932.             Dbl_Qcyete = Dbl_Qcyete + Val(RecTemp.Fields("Jfjehj") & "") - Val(RecTemp.Fields("Dfjehj") & "")
  933.             Dbl_Qcslte = Dbl_Qcslte + Val(RecTemp.Fields("Jfslhj") & "") - Val(RecTemp.Fields("Dfslhj") & "")
  934.             Dbl_Qcwbte = Dbl_Qcwbte + Val(RecTemp.Fields("Wbjfjehj") & "") - Val(RecTemp.Fields("Wbdfjehj") & "")
  935.             
  936.             Dbl_Jejflj = Dbl_Jejflj + Val(RecTemp.Fields("Jfjehj") & "")
  937.             Dbl_Jedflj = Dbl_Jedflj + Val(RecTemp.Fields("Dfjehj") & "")
  938.             Dbl_Sljflj = Dbl_Sljflj + Val(RecTemp.Fields("Jfslhj") & "")
  939.             Dbl_Sldflj = Dbl_Sldflj + Val(RecTemp.Fields("Dfslhj") & "")
  940.             Dbl_Wbjflj = Dbl_Wbjflj + Val(RecTemp.Fields("Wbjfjehj") & "")
  941.             Dbl_Wbdflj = Dbl_Wbdflj + Val(RecTemp.Fields("Wbdfjehj") & "")
  942.         End If
  943.         
  944.         If (Dbl_Qcyete <> 0 Or (Bln_EndFlag And (Dbl_Qcslte <> 0 Or dnl_qcwbte <> 0))) Or Bln_QcZeroShow Then    '如果期初数据为零,且用户选择不输出则不显示此行数据
  945.             CxbbGrid.AddItem ""
  946.             Jsqte = Jsqte + 1
  947.             
  948.             '将期初数据写入网格(昨日余额)
  949.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "昨日余额"
  950.             
  951.             '输出余额
  952.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  953.         End If
  954.         
  955.     End If
  956.     
  957.     '2.读取查询会计期间范围内所有符合条件明细帐数据(以年度+会计期间),并写入网格
  958.     
  959.     Bln_NotFirst = False
  960.     
  961.     '筛选所有符合条件数据
  962.     
  963.     If Not Bln_QueryDay Then
  964.         Sqlstr = "SELECT *" & _
  965.         " From Cwzz_V_AccVouchAss Where Ccode like '" & Str_Ccode & "%'And Year=" & Int_Year & _
  966.         " And Period>=" & Int_BPeriod & " And Period<=" & Int_EPeriod
  967.     Else
  968.         Sqlstr = "SELECT *" & _
  969.         " From Cwzz_V_AccVouchAss Where Ccode like '" & Str_Ccode & "%'" & _
  970.         " And DDate>='" & Dtm_BeginDay & "' And DDate<='" & Dtm_EndDay & "'"
  971.     End If
  972.     If Not Bln_IncluNotBook Then
  973.         Sqlstr = Sqlstr & " And BookFlag=1"
  974.     End If
  975.     Sqlstr = Sqlstr & " Order By Year,Period,Ddate,VouchID,SerialID"
  976.     
  977.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  978.     
  979.     With RecTemp
  980.         
  981.         Do While Not .EOF
  982.             If Bln_NotFirst Then
  983.                 
  984.                 If .Fields("DDate") <> Dtm_DqDay Then
  985.                     '显示本日合计
  986.                     If Lng_DayCount <> 0 Then
  987.                         CxbbGrid.AddItem ""
  988.                         Jsqte = Jsqte + 1
  989.                         
  990.                         '输出本日合计
  991.                         Call Sub_OutDaySum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dtm_DqDay, Dbl_DayJejfhj, Dbl_DayJedfhj, Dbl_DaySljfhj, Dbl_DaySldfhj, Dbl_DayWbjfhj, Dbl_DayWbdfhj)
  992.                         
  993.                         '输出余额
  994.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  995.                     End If
  996.                     
  997.                     '重新初始化本日合计数据
  998.                     Dbl_DayJejfhj = 0
  999.                     Dbl_DayJedfhj = 0
  1000.                     Dbl_DaySljfhj = 0
  1001.                     Dbl_DaySldfhj = 0
  1002.                     Dbl_DayWbjfhj = 0
  1003.                     Dbl_DayWbdfhj = 0
  1004.                     
  1005.                     Lng_DayCount = 0
  1006.                 End If
  1007.                 
  1008.                 '当前进行会计期间发生变化则添加本月合计及本年累计
  1009.                 If .Fields("Period") <> Int_DqPeriod Then
  1010.                     '显示本月合计
  1011.                     If Lng_MonthCount <> 0 Then
  1012.                         CxbbGrid.AddItem ""
  1013.                         Jsqte = Jsqte + 1
  1014.                         
  1015.                         '输出本月合计
  1016.                         Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  1017.                         
  1018.                         '输出余额
  1019.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1020.                     End If
  1021.                     
  1022.                     '重新初始化本月合计数据
  1023.                     Dbl_Jejfhj = 0
  1024.                     Dbl_Jedfhj = 0
  1025.                     Dbl_Sljfhj = 0
  1026.                     Dbl_Sldfhj = 0
  1027.                     Dbl_Wbjfhj = 0
  1028.                     Dbl_Wbdfhj = 0
  1029.                     
  1030.                     Lng_MonthCount = 0
  1031.                     
  1032.                     '显示本年累计
  1033.                     If Lng_YearCount <> 0 Then
  1034.                         CxbbGrid.AddItem ""
  1035.                         Jsqte = Jsqte + 1
  1036.                         
  1037.                         '输出本年累计
  1038.                         Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  1039.                         
  1040.                         '输出余额
  1041.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1042.                     End If
  1043.                     
  1044.                     
  1045.                 End If        '显示本月合计,本年累计完毕
  1046.             End If
  1047.             
  1048.             Bln_NotFirst = True
  1049.             
  1050.             '显示明细数据
  1051.             CxbbGrid.AddItem ""
  1052.             Jsqte = Jsqte + 1
  1053.             
  1054.             '本日、本月、本年记录计数器+1
  1055.             Lng_DayCount = Lng_DayCount + 1
  1056.             Lng_MonthCount = Lng_MonthCount + 1
  1057.             Lng_YearCount = Lng_YearCount + 1
  1058.             
  1059.             '未记帐明细分录变色显示
  1060.             If .Fields("BookFlag") = 0 Then
  1061.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  1062.             End If
  1063.             
  1064.             '修改当前会计期间,当前日期
  1065.             Int_DqPeriod = .Fields("Period")
  1066.             Dtm_DqDay = .Fields("DDate")
  1067.             
  1068.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("VouchId")              '凭证ID
  1069.             
  1070.             If IsDate(.Fields("Ddate")) Then
  1071.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = .Fields("Ddate")                    '日期
  1072.             End If
  1073.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") + "-" + Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4) '凭证字号
  1074.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")           '摘要
  1075.             
  1076.             '部门
  1077.             If Trim(.Fields("DeptName") & "") <> "" Then
  1078.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("DeptName") & "")
  1079.             End If
  1080.             '个人
  1081.             If Trim(.Fields("PersonName") & "") <> "" Then
  1082.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("PersonName") & "")
  1083.             End If
  1084.             '客户
  1085.             If Trim(.Fields("CusName") & "") <> "" Then
  1086.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("CusName") & "")
  1087.             End If
  1088.             '项目
  1089.             If Trim(.Fields("ItemName") & "") <> "" Then
  1090.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("ItemName") & "")
  1091.             End If
  1092.             
  1093.             If .Fields("Jfje") <> 0 Then                                                                       '借方金额
  1094.                 CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = .Fields("Jfje")
  1095.                 CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = .Fields("Jfje")
  1096.             End If
  1097.             If .Fields("Dfje") <> 0 Then                                                                       '贷方金额
  1098.                 CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = .Fields("Dfje")
  1099.                 CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = .Fields("Dfje")
  1100.             End If
  1101.             
  1102.             '只有末级科目才显示数量和外币,数量不为零则计算单价
  1103.             If Bln_EndFlag Then
  1104.                 If .Fields("Jfsl") <> 0 Then                                                                    '借方数量
  1105.                     CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = .Fields("Jfsl")
  1106.                     If .Fields("Jfje") <> 0 Then
  1107.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  1108.                     Else
  1109.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  1110.                     End If
  1111.                 End If
  1112.                 If .Fields("Dfsl") <> 0 Then                                                                    '贷方数量
  1113.                     CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = .Fields("Dfsl")
  1114.                     If .Fields("Jfje") <> 0 Then
  1115.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  1116.                     Else
  1117.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  1118.                     End If
  1119.                 End If
  1120.             End If
  1121.             If Bln_EndFlag And Bln_ForeignFlag Then
  1122.                 If .Fields("Wbjfje") <> 0 Then                                                                  '借方外币
  1123.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = .Fields("Wbjfje")
  1124.                 End If
  1125.                 If .Fields("Wbdfje") <> 0 Then                                                                  '贷方外币
  1126.                     CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = .Fields("Wbdfje")
  1127.                 End If
  1128.                 If .Fields("AccRate") <> 0 Then                                                                 '记帐汇率
  1129.                     CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Format(.Fields("AccRate"), "##." + String(Int_Wbhlxsws, "0"))
  1130.                 End If
  1131.                 
  1132.             End If
  1133.             
  1134.             '累加本日合计,本月合计,本年累计数据
  1135.             Dbl_DayJejfhj = Dbl_DayJejfhj + .Fields("Jfje")
  1136.             Dbl_DayJedfhj = Dbl_DayJedfhj + .Fields("Dfje")
  1137.             Dbl_DaySljfhj = Dbl_DaySljfhj + .Fields("Jfsl")
  1138.             Dbl_DaySldfhj = Dbl_DaySldfhj + .Fields("Dfsl")
  1139.             Dbl_DayWbjfhj = Dbl_DayWbjfhj + .Fields("Wbjfje")
  1140.             Dbl_DayWbdfhj = Dbl_DayWbdfhj + .Fields("Wbdfje")
  1141.             
  1142.             Dbl_Jejfhj = Dbl_Jejfhj + .Fields("Jfje")
  1143.             Dbl_Jedfhj = Dbl_Jedfhj + .Fields("Dfje")
  1144.             Dbl_Sljfhj = Dbl_Sljfhj + .Fields("Jfsl")
  1145.             Dbl_Sldfhj = Dbl_Sldfhj + .Fields("Dfsl")
  1146.             Dbl_Wbjfhj = Dbl_Wbjfhj + .Fields("Wbjfje")
  1147.             Dbl_Wbdfhj = Dbl_Wbdfhj + .Fields("Wbdfje")
  1148.             
  1149.             Dbl_Jejflj = Dbl_Jejflj + .Fields("Jfje")
  1150.             Dbl_Jedflj = Dbl_Jedflj + .Fields("Dfje")
  1151.             Dbl_Sljflj = Dbl_Sljflj + .Fields("Jfsl")
  1152.             Dbl_Sldflj = Dbl_Sldflj + .Fields("Dfsl")
  1153.             Dbl_Wbjflj = Dbl_Wbjflj + .Fields("Wbjfje")
  1154.             Dbl_Wbdflj = Dbl_Wbdflj + .Fields("Wbdfje")
  1155.             
  1156.             '3.计算余额
  1157.             Dbl_Qcyete = Dbl_Qcyete + .Fields("Jfje") - .Fields("Dfje")
  1158.             Dbl_Qcslte = Dbl_Qcslte + .Fields("Jfsl") - .Fields("Dfsl")
  1159.             Dbl_Qcwbte = Dbl_Qcwbte + .Fields("Wbjfje") - .Fields("Wbdfje")
  1160.             
  1161.             '输出余额
  1162.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1163.             
  1164.             .MoveNext
  1165.             
  1166.             '计算是否输出承前/过次行(如果用户选择输出承前/过次)
  1167.             If Bln_CqGcShow Then
  1168.                 If Not .EOF Then
  1169.                     If .Fields("Period") = Int_DqPeriod Then
  1170.                         Call Sub_OutQcGc(Jsqte, Int_Zdzyhs, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1171.                     End If
  1172.                 End If
  1173.             End If
  1174.             
  1175.         Loop
  1176.         
  1177.         '添加本月合计及本年累计
  1178.         
  1179.         If Bln_NotFirst Then
  1180.             '显示本日合计
  1181.             If Lng_DayCount <> 0 Then
  1182.                 CxbbGrid.AddItem ""
  1183.                 Jsqte = Jsqte + 1
  1184.                 
  1185.                 '输出本日合计
  1186.                 Call Sub_OutDaySum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dtm_DqDay, Dbl_DayJejfhj, Dbl_DayJedfhj, Dbl_DaySljfhj, Dbl_DaySldfhj, Dbl_DayWbjfhj, Dbl_DayWbdfhj)
  1187.                 
  1188.                 '输出余额
  1189.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1190.             End If
  1191.             
  1192.             If Lng_MonthCount <> 0 Then
  1193.                 CxbbGrid.AddItem ""
  1194.                 Jsqte = Jsqte + 1
  1195.                 
  1196.                 '输出本月合计
  1197.                 Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  1198.                 
  1199.                 '输出余额
  1200.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1201.             End If
  1202.             
  1203.             '显示本年累计
  1204.             If Lng_YearCount <> 0 Then
  1205.                 CxbbGrid.AddItem ""
  1206.                 Jsqte = Jsqte + 1
  1207.                 
  1208.                 '输出本年累计
  1209.                 Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  1210.                 
  1211.                 '输出余额
  1212.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1213.             End If
  1214.             
  1215.             
  1216.         End If
  1217.         
  1218.     End With
  1219.     
  1220.     '重置网格行高
  1221.     For Jsqte = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  1222.         CxbbGrid.RowHeight(Jsqte) = Sjhgd
  1223.     Next Jsqte
  1224.     
  1225. End Sub
  1226. Private Sub Combo_AccFormat_Click()                    '用户选择不同帐页格式
  1227.     Dim Int_Coljsq As Integer         '网格列临时计数器
  1228.     
  1229.     '为了加快显示速度
  1230.     CxbbGrid.Redraw = False
  1231.     
  1232.     For Int_Coljsq = Qslz To CxbbGrid.Cols - 1
  1233.         CxbbGrid.ColHidden(Int_Coljsq) = True
  1234.     Next Int_Coljsq
  1235.     
  1236.     Select Case Combo_AccFormat
  1237.     Case "金额式"
  1238.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1239.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1240.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1241.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '借方.借方
  1242.         CxbbGrid.ColHidden(Sydz("010", GridStr(), Szzls)) = False      '贷方.贷方
  1243.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1244.         CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '余额.余额
  1245.         
  1246.     Case "外币金额式"
  1247.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1248.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1249.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1250.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1251.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1252.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1253.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1254.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1255.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1256.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1257.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1258.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1259.         
  1260.     Case "数量金额式"
  1261.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1262.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1263.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1264.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1265.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1266.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1267.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1268.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1269.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1270.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1271.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1272.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1273.     Case "数量外币式"
  1274.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1275.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1276.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1277.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1278.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1279.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1280.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1281.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1282.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1283.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1284.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1285.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1286.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1287.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1288.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1289.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1290.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1291.     End Select
  1292.     CxbbGrid.Redraw = True
  1293. End Sub
  1294. Private Sub Sub_OutBalance(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#)          '输出余额
  1295.     If Dbl_Qcyete = 0 Then
  1296.         CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "平"          '期初方向
  1297.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1298.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1299.         End If
  1300.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1301.             CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1302.         End If
  1303.     Else
  1304.         If Dbl_Qcyete > 0 Then
  1305.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "借"
  1306.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Dbl_Qcyete
  1307.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Dbl_Qcyete
  1308.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1309.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1310.             End If
  1311.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1312.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1313.             End If
  1314.         Else
  1315.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "贷"
  1316.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = -Dbl_Qcyete
  1317.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = -Dbl_Qcyete
  1318.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1319.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = -Dbl_Qcslte
  1320.             End If
  1321.             If Bln_EndFlag And Dbl_Qcwbte And Bln_ForeignFlag <> 0 Then
  1322.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = -Dbl_Qcwbte
  1323.             End If
  1324.         End If
  1325.         
  1326.         '输出单价
  1327.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1328.             CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcslte, "##." + String(Xtdjxsws, "0"))
  1329.         End If
  1330.         '输出外币汇率
  1331.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1332.             If Bln_ConVertFlag Then      '(外币/汇率=本位币)
  1333.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcwbte / Dbl_Qcyete, "##." + String(Int_Wbhlxsws, "0"))
  1334.             Else
  1335.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcwbte, "##." + String(Int_Wbhlxsws, "0"))
  1336.             End If
  1337.         End If
  1338.         
  1339.     End If
  1340. End Sub
  1341. Private Sub Sub_OutDaySum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dtm_DqDay As Date, Dbl_DayJejfhj#, Dbl_DayJedfhj#, Dbl_DaySljfhj#, Dbl_DaySldfhj#, Dbl_DayWbjfhj#, Dbl_DayWbdfhj#)  '输出本日合计
  1342.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Dtm_DqDay
  1343.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本日合计"
  1344.     If Dbl_DayJejfhj <> 0 Then                                                        '本日借方金额合计
  1345.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_DayJejfhj
  1346.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_DayJejfhj
  1347.     End If
  1348.     If Dbl_DayJedfhj <> 0 Then                                                        '本日贷方金额合计
  1349.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_DayJedfhj
  1350.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_DayJedfhj
  1351.     End If
  1352.     
  1353.     '只有末级科目才显示数量和外币
  1354.     If Bln_EndFlag Then
  1355.         If Dbl_DaySljfhj <> 0 Then                                                     '本日借方数量合计
  1356.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_DaySljfhj
  1357.         End If
  1358.         If Dbl_DaySldfhj <> 0 Then                                                     '本日贷方数量合计
  1359.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_DaySldfhj
  1360.         End If
  1361.     End If
  1362.     
  1363.     If Bln_EndFlag And Bln_ForeignFlag Then
  1364.         If Dbl_DayWbjfhj <> 0 Then                                                     '本日借方外币合计
  1365.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_DayWbjfhj
  1366.         End If
  1367.         If Dbl_DayWbdfhj <> 0 Then                                                     '本日贷方外币合计
  1368.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_DayWbdfhj
  1369.         End If
  1370.     End If
  1371. End Sub
  1372. Private Sub Sub_OutPeriodSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj#) '输出本月合计
  1373.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1374.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本月合计"
  1375.     If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1376.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1377.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1378.     End If
  1379.     If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1380.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1381.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1382.     End If
  1383.     
  1384.     '只有末级科目才显示数量和外币
  1385.     If Bln_EndFlag Then
  1386.         If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1387.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1388.         End If
  1389.         If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1390.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1391.         End If
  1392.     End If
  1393.     If Bln_EndFlag And Bln_ForeignFlag Then
  1394.         If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1395.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1396.         End If
  1397.         If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1398.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1399.         End If
  1400.     End If
  1401. End Sub
  1402. Private Sub Sub_OutYearSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj#)  '输出本年累计
  1403.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1404.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本年累计"
  1405.     If Dbl_Jejflj <> 0 Then                                                        '本年借方金额累计
  1406.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejflj
  1407.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejflj
  1408.     End If
  1409.     If Dbl_Jedflj <> 0 Then                                                        '本年贷方金额累计
  1410.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedflj
  1411.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedflj
  1412.     End If
  1413.     
  1414.     '只有末级科目才显示数量和外币
  1415.     If Bln_EndFlag Then
  1416.         If Dbl_Sljflj <> 0 Then                                                     '本年借方数量累计
  1417.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljflj
  1418.         End If
  1419.         If Dbl_Sldflj <> 0 Then                                                     '本年贷方数量累计
  1420.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldflj
  1421.         End If
  1422.     End If
  1423.     If Bln_EndFlag And Bln_ForeignFlag Then
  1424.         If Dbl_Wbjflj <> 0 Then                                                     '本年借方外币累计
  1425.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjflj
  1426.         End If
  1427.         If Dbl_Wbdflj <> 0 Then                                                     '本年贷方外币累计
  1428.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdflj
  1429.         End If
  1430.     End If
  1431. End Sub
  1432. Private Sub Sub_OutQcGc(Jsqte As Long, Int_Zdzyhs%, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj#, Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#) '输出承前/过次行
  1433.     If (Jsqte - CxbbGrid.FixedRows + 2) Mod Int_Zdzyhs = 0 Then
  1434.         CxbbGrid.AddItem ""
  1435.         Jsqte = Jsqte + 1
  1436.         CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(1).BackColor
  1437.         CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1438.         CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "过次页"
  1439.         If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1440.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1441.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1442.         End If
  1443.         If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1444.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1445.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1446.         End If
  1447.         
  1448.         '只有末级科目才显示数量和外币
  1449.         If Bln_EndFlag Then
  1450.             If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1451.                 CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1452.             End If
  1453.             If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1454.                 CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1455.             End If
  1456.         End If
  1457.         If Bln_EndFlag And Bln_ForeignFlag Then
  1458.             If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1459.                 CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1460.             End If
  1461.             If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1462.                 CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1463.             End If
  1464.         End If
  1465.         
  1466.         '输出余额
  1467.         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1468.         
  1469.         CxbbGrid.AddItem ""
  1470.         Jsqte = Jsqte + 1
  1471.         CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(2).BackColor
  1472.         CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1473.         CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "承前页"
  1474.         If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1475.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1476.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1477.         End If
  1478.         If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1479.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1480.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1481.         End If
  1482.         
  1483.         '只有末级科目才显示数量和外币
  1484.         If Bln_EndFlag Then
  1485.             If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1486.                 CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1487.             End If
  1488.             If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1489.                 CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1490.             End If
  1491.         End If
  1492.         If Bln_EndFlag And Bln_ForeignFlag Then
  1493.             If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1494.                 CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1495.             End If
  1496.             If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1497.                 CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1498.             End If
  1499.         End If
  1500.         
  1501.         '输出余额
  1502.         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1503.     End If
  1504. End Sub
  1505. Private Sub CxbbGrid_DblClick()          '用户双击网格调入相应凭证
  1506.     Dim RecTemp As New ADODB.Recordset
  1507.     
  1508.     With CxbbGrid
  1509.         '非数据行退出
  1510.         If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1511.             Exit Sub
  1512.         End If
  1513.         If Trim(.TextMatrix(.Row, 0)) = "" Then
  1514.             Exit Sub
  1515.         End If
  1516.     End With
  1517.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  1518.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1519.     
  1520.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1521.     
  1522.     With RecTemp
  1523.         
  1524.         If .EOF Then
  1525.             Tsxx = "此凭证已被其他用户删除!"
  1526.             Call Xtxxts(Tsxx, 0, 4)
  1527.             Exit Sub
  1528.         Else
  1529.             
  1530.             With PZ_JzpzclFrm
  1531.                 '填充查询凭证标识
  1532.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1533.                 
  1534.                 '设置凭证处理为列表查询状态
  1535.                 .Lab_Pzclzt.Caption = "4"
  1536.                 
  1537.                 .Show 1
  1538.                 
  1539.             End With
  1540.             
  1541.         End If
  1542.         
  1543.     End With
  1544.     
  1545. End Sub
  1546. Private Sub Sub_LcZflz()                               '联查总分类帐
  1547.     Dim Str_Ccode As String          '查询科目
  1548.     
  1549.     '如果科目为空则不进行查询
  1550.     If Trim(Imgebo_QueryCode.Text) <> "" Then
  1551.         Str_Ccode = GetComboKey(Imgebo_QueryCode, 0)
  1552.     Else
  1553.         Exit Sub
  1554.     End If
  1555.     
  1556.     '联查总分类帐
  1557.     If Trim(Str_Ccode) <> "" Then
  1558.         ZB_Frmzflztj.LrText(0).Text = Str_Ccode                                                                                                                 '查询科目
  1559.         ZB_Frmzflztj.Chk_NotBook.Value = ZB_FrmKmrjztj.Chk_NotBook.Value      '是否包含未记帐凭证
  1560.         ZB_Frmzflzjg.Timer1.Enabled = True                                    '激活查询总分类帐过程
  1561.         ZB_Frmzflzjg.Show
  1562.         ZB_Frmzflzjg.SetFocus
  1563.     End If
  1564. End Sub
  1565. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1566.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1567.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1568.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1569.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1570.     ReDim Bbxbt(1 To Bbxbtgs)
  1571.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1572.     If Bbbwhgs <> 0 Then
  1573.         ReDim Bbbwh(1 To Bbbwhgs)
  1574.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1575.     End If
  1576.     Bbzbt = ReportTitle
  1577.     Bbxbt(1) = Space(2) + "科目名称:" + Me.Imgebo_QueryCode.Text
  1578.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1579.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1580.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1581.     If Not bbylte Then
  1582.         Unload DY_Tybbyldy
  1583.     End If
  1584. End Sub
  1585. Private Sub Sub_Lxdy()                                 '帐页连续打印(帐页每批尽量少选)
  1586.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1587.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1588.     Dim Jsqte As Integer
  1589.     Dim YAnswer As Integer
  1590.     
  1591.     '用户确认是否开始连续打印帐页
  1592.     Tsxx = "请确认是否开始连续打印帐页?"
  1593.     YAnswer = Xtxxts(Tsxx, 2, 2)
  1594.     If YAnswer <> 1 Then
  1595.         Exit Sub
  1596.     End If
  1597.     
  1598.     '初始化连续打印状态
  1599.     Cmd_CancelPrint.Visible = True
  1600.     Cmd_CancelPrint.SetFocus
  1601.     Cmd_CancelPrint.Refresh
  1602.     Bln_CancelPrint = False
  1603.     Bln_Printing = True
  1604.     
  1605.     '循环输出打印作业
  1606.     For Jsqte = 1 To Imgebo_QueryCode.ComboItems.count
  1607.         Imgebo_QueryCode.Text = Imgebo_QueryCode.ComboItems(Jsqte).Text
  1608.         Imgebo_QueryCode.ComboItems.Item(Jsqte).Selected = True
  1609.         Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1610.         Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1611.         ReDim Bbxbt(1 To Bbxbtgs)
  1612.         ReDim bbxbtzzxs(1 To Bbxbtgs)
  1613.         If Bbbwhgs <> 0 Then
  1614.             ReDim Bbbwh(1 To Bbbwhgs)
  1615.             ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1616.         End If
  1617.         Bbzbt = ReportTitle
  1618.         Bbxbt(1) = Space(2) + "科目名称:" + Me.Imgebo_QueryCode.Text
  1619.         bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1620.         Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1621.         Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, False, True)
  1622.         Unload DY_Tybbyldy
  1623.         DoEvents
  1624.         If Bln_CancelPrint Then
  1625.             Bln_Printing = False
  1626.             Exit Sub
  1627.         End If
  1628.     Next Jsqte
  1629.     Bln_Printing = False
  1630.     Cmd_CancelPrint.Visible = False
  1631. End Sub
  1632. Private Sub Cmd_CancelPrint_Click()                    '取消帐页连续打印
  1633.     Bln_CancelPrint = True
  1634.     Cmd_CancelPrint.Visible = False
  1635. End Sub