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

企业管理

开发平台:

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 Book_Vari 
  5.    Caption         =   "资产变动记录"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   11880
  10.    HelpContextID   =   505002
  11.    Icon            =   "固定资产变动单.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   8595
  16.    ScaleWidth      =   11880
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.Timer Timer1 
  19.       Enabled         =   0   'False
  20.       Interval        =   1
  21.       Left            =   6540
  22.       Top             =   60
  23.    End
  24.    Begin VB.PictureBox Pic_Title 
  25.       BackColor       =   &H00FFFFFF&
  26.       Height          =   825
  27.       Left            =   0
  28.       Picture         =   "固定资产变动单.frx":1042
  29.       ScaleHeight     =   765
  30.       ScaleWidth      =   11835
  31.       TabIndex        =   1
  32.       Top             =   570
  33.       Width           =   11895
  34.       Begin MSComctlLib.ImageList ImageList1 
  35.          Left            =   4350
  36.          Top             =   -30
  37.          _ExtentX        =   1005
  38.          _ExtentY        =   1005
  39.          BackColor       =   -2147483643
  40.          ImageWidth      =   16
  41.          ImageHeight     =   16
  42.          MaskColor       =   12632256
  43.          _Version        =   393216
  44.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  45.             NumListImages   =   8
  46.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  47.                Picture         =   "固定资产变动单.frx":35106
  48.                Key             =   "sz"
  49.             EndProperty
  50.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  51.                Picture         =   "固定资产变动单.frx":354A0
  52.                Key             =   "dy"
  53.             EndProperty
  54.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  55.                Picture         =   "固定资产变动单.frx":3583A
  56.                Key             =   "yl"
  57.             EndProperty
  58.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  59.                Picture         =   "固定资产变动单.frx":35BD4
  60.                Key             =   "bz"
  61.             EndProperty
  62.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  63.                Picture         =   "固定资产变动单.frx":35F6E
  64.                Key             =   "tc"
  65.             EndProperty
  66.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  67.                Picture         =   "固定资产变动单.frx":36308
  68.                Key             =   "bcgs"
  69.             EndProperty
  70.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  71.                Picture         =   "固定资产变动单.frx":366A2
  72.                Key             =   "mrlk"
  73.             EndProperty
  74.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  75.                Picture         =   "固定资产变动单.frx":36A3C
  76.                Key             =   "xsxm"
  77.             EndProperty
  78.          EndProperty
  79.       End
  80.       Begin VB.Label lbl_Num 
  81.          BackStyle       =   0  'Transparent
  82.          Caption         =   "200011"
  83.          ForeColor       =   &H00000000&
  84.          Height          =   180
  85.          Left            =   4830
  86.          TabIndex        =   7
  87.          Top             =   450
  88.          Width           =   540
  89.       End
  90.       Begin VB.Label Label1 
  91.          AutoSize        =   -1  'True
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "卡片编号:"
  94.          Height          =   180
  95.          Left            =   3960
  96.          TabIndex        =   6
  97.          Top             =   450
  98.          Width           =   810
  99.       End
  100.       Begin VB.Label tsLabel 
  101.          AutoSize        =   -1  'True
  102.          BackColor       =   &H80000018&
  103.          BackStyle       =   0  'Transparent
  104.          Caption         =   "固定资产变动单"
  105.          BeginProperty Font 
  106.             Name            =   "宋体"
  107.             Size            =   12
  108.             Charset         =   134
  109.             Weight          =   700
  110.             Underline       =   0   'False
  111.             Italic          =   0   'False
  112.             Strikethrough   =   0   'False
  113.          EndProperty
  114.          ForeColor       =   &H00000000&
  115.          Height          =   240
  116.          Index           =   4
  117.          Left            =   585
  118.          TabIndex        =   2
  119.          Top             =   240
  120.          Width           =   1785
  121.       End
  122.    End
  123.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  124.       Height          =   7215
  125.       Left            =   0
  126.       TabIndex        =   0
  127.       Top             =   1440
  128.       Width           =   11895
  129.       _cx             =   5080
  130.       _cy             =   5080
  131.       Appearance      =   1
  132.       BorderStyle     =   1
  133.       Enabled         =   -1  'True
  134.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  135.          Name            =   "宋体"
  136.          Size            =   9
  137.          Charset         =   134
  138.          Weight          =   400
  139.          Underline       =   0   'False
  140.          Italic          =   0   'False
  141.          Strikethrough   =   0   'False
  142.       EndProperty
  143.       MousePointer    =   0
  144.       BackColor       =   -2147483643
  145.       ForeColor       =   -2147483640
  146.       BackColorFixed  =   -2147483633
  147.       ForeColorFixed  =   -2147483630
  148.       BackColorSel    =   -2147483635
  149.       ForeColorSel    =   -2147483634
  150.       BackColorBkg    =   -2147483636
  151.       BackColorAlternate=   -2147483643
  152.       GridColor       =   -2147483633
  153.       GridColorFixed  =   -2147483632
  154.       TreeColor       =   -2147483632
  155.       FloodColor      =   192
  156.       SheetBorder     =   -2147483642
  157.       FocusRect       =   1
  158.       HighLight       =   1
  159.       AllowSelection  =   -1  'True
  160.       AllowBigSelection=   -1  'True
  161.       AllowUserResizing=   0
  162.       SelectionMode   =   0
  163.       GridLines       =   1
  164.       GridLinesFixed  =   2
  165.       GridLineWidth   =   1
  166.       Rows            =   50
  167.       Cols            =   10
  168.       FixedRows       =   1
  169.       FixedCols       =   1
  170.       RowHeightMin    =   0
  171.       RowHeightMax    =   0
  172.       ColWidthMin     =   0
  173.       ColWidthMax     =   0
  174.       ExtendLastCol   =   0   'False
  175.       FormatString    =   ""
  176.       ScrollTrack     =   0   'False
  177.       ScrollBars      =   3
  178.       ScrollTips      =   0   'False
  179.       MergeCells      =   0
  180.       MergeCompare    =   0
  181.       AutoResize      =   -1  'True
  182.       AutoSizeMode    =   0
  183.       AutoSearch      =   0
  184.       AutoSearchDelay =   2
  185.       MultiTotals     =   -1  'True
  186.       SubtotalPosition=   1
  187.       OutlineBar      =   0
  188.       OutlineCol      =   0
  189.       Ellipsis        =   0
  190.       ExplorerBar     =   0
  191.       PicturesOver    =   0   'False
  192.       FillStyle       =   0
  193.       RightToLeft     =   0   'False
  194.       PictureType     =   0
  195.       TabBehavior     =   0
  196.       OwnerDraw       =   0
  197.       Editable        =   0
  198.       ShowComboButton =   1
  199.       WordWrap        =   0   'False
  200.       TextStyle       =   0
  201.       TextStyleFixed  =   0
  202.       OleDragMode     =   0
  203.       OleDropMode     =   0
  204.       DataMode        =   0
  205.       VirtualData     =   -1  'True
  206.       DataMember      =   ""
  207.       ComboSearch     =   3
  208.       AutoSizeMouse   =   -1  'True
  209.       FrozenRows      =   0
  210.       FrozenCols      =   0
  211.       AllowUserFreezing=   0
  212.       BackColorFrozen =   0
  213.       ForeColorFrozen =   0
  214.       WallPaperAlignment=   9
  215.       AccessibleName  =   ""
  216.       AccessibleDescription=   ""
  217.       AccessibleValue =   ""
  218.       AccessibleRole  =   24
  219.    End
  220.    Begin MSComctlLib.Toolbar GsToolbar 
  221.       Height          =   525
  222.       Left            =   9390
  223.       TabIndex        =   3
  224.       Top             =   30
  225.       Width           =   2475
  226.       _ExtentX        =   4366
  227.       _ExtentY        =   926
  228.       ButtonWidth     =   1455
  229.       ButtonHeight    =   926
  230.       Appearance      =   1
  231.       Style           =   1
  232.       ImageList       =   "ImageList1"
  233.       _Version        =   393216
  234.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  235.          NumButtons      =   3
  236.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  237.             Caption         =   "保存格式"
  238.             Key             =   "bcgs"
  239.             ImageKey        =   "bcgs"
  240.          EndProperty
  241.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  242.             Caption         =   "默认列宽"
  243.             Key             =   "hfmrgs"
  244.             ImageKey        =   "mrlk"
  245.          EndProperty
  246.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  247.             Caption         =   "显示项目"
  248.             Key             =   "szxsxm"
  249.             ImageKey        =   "xsxm"
  250.          EndProperty
  251.       EndProperty
  252.    End
  253.    Begin MSComctlLib.Toolbar SzToolbar 
  254.       Align           =   1  'Align Top
  255.       Height          =   555
  256.       Left            =   0
  257.       TabIndex        =   4
  258.       Top             =   0
  259.       Width           =   11880
  260.       _ExtentX        =   20955
  261.       _ExtentY        =   979
  262.       ButtonWidth     =   820
  263.       ButtonHeight    =   926
  264.       AllowCustomize  =   0   'False
  265.       Appearance      =   1
  266.       Style           =   1
  267.       ImageList       =   "ImageList1"
  268.       _Version        =   393216
  269.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  270.          NumButtons      =   6
  271.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  272.             Caption         =   "设置"
  273.             Key             =   "ymsz"
  274.             ImageKey        =   "sz"
  275.          EndProperty
  276.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  277.             Caption         =   "打印"
  278.             Key             =   "dy"
  279.             ImageKey        =   "dy"
  280.          EndProperty
  281.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  282.             Caption         =   "预览"
  283.             Key             =   "yl"
  284.             ImageKey        =   "yl"
  285.          EndProperty
  286.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  287.             Style           =   4
  288.          EndProperty
  289.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  290.             Caption         =   "帮助"
  291.             Key             =   "bz"
  292.             ImageKey        =   "bz"
  293.          EndProperty
  294.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  295.             Caption         =   "退出"
  296.             Key             =   "fh"
  297.             ImageKey        =   "tc"
  298.          EndProperty
  299.       EndProperty
  300.       BorderStyle     =   1
  301.       Begin VB.TextBox Txt_Bit 
  302.          Height          =   270
  303.          Left            =   5070
  304.          TabIndex        =   5
  305.          Text            =   "Text1"
  306.          Top             =   1230
  307.          Visible         =   0   'False
  308.          Width           =   1035
  309.       End
  310.    End
  311. End
  312. Attribute VB_Name = "Book_Vari"
  313. Attribute VB_GlobalNameSpace = False
  314. Attribute VB_Creatable = False
  315. Attribute VB_PredeclaredId = True
  316. Attribute VB_Exposed = False
  317. '******************************************************************
  318. '*    模 块 名 称 :资产变动单
  319. '*    功 能 描 述 :
  320. '*    程序员姓名  :徐衍民
  321. '*    最后修改人  :徐衍民
  322. '*    最后修改时间:2001/12/12
  323. '*    备        注:
  324. '******************************************************************
  325. Dim ReportTitle As String                '报表主标题
  326. Dim Card_Str As String                   '用户录入查询条件
  327. Dim rstemp As ADODB.Recordset
  328. '以下为固定使用变量
  329. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  330. Dim GridCode As String                   '显示网格网格代码
  331. Dim GridInf() As Variant                 '整个网格设置信息
  332. Dim Tsxx As String                       '系统提示信息
  333. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  334. Dim Sjhgd As Double                      '网格数据行高度
  335. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  336. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  337. Dim GridStr()  As String                 '网格列信息(字符型)
  338. Dim GridInt() As Integer                 '网格列信息(整型)
  339. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  340. Private Sub Form_Activate()
  341.     If Me.AutoRedraw = False Then
  342.         Xt_Wait.Show
  343.         Xt_Wait.Refresh
  344.         
  345.         '加快显示速度
  346.         CxbbGrid.Redraw = False
  347.         
  348.         '生成查询结果
  349.         Call Sub_Query
  350.         
  351.         CxbbGrid.Redraw = True
  352.          
  353.         Xt_Wait.Hide
  354.     End If
  355.     Me.AutoRedraw = True
  356.     
  357. End Sub
  358. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  359.     
  360.     On Error Resume Next
  361.     
  362.     With CxbbGrid
  363.         .Width = Me.Width - 160
  364.         .Height = Me.Height - .Top - 400
  365.     End With
  366.     
  367.     With Pic_Title
  368.         .Width = Me.Width - 160
  369.     End With
  370.     
  371.     GsToolbar.Left = Me.Width - GsToolbar.Width - 160
  372. End Sub
  373. Private Sub Form_Load()                                                   '窗体装入
  374.      
  375.     '调入打印页面设置窗体
  376.     ReportTitle = "固定资产变动单"
  377.     XtReportCode = "Gdzc_Book_Vari"
  378.     Load Dyymctbl
  379.      
  380.     '调整标题栏及网格、格式工具条位置
  381.     Pic_Title.Left = 40
  382.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  383.     CxbbGrid.Left = Pic_Title.Left
  384.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  385.     
  386.     '调 入 网 格
  387.     GridCode = "Gdzc_Book_Vari"
  388.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  389.      
  390.     Qslz = GridInf(1)
  391.     Sjhgd = GridInf(2)
  392.     Sfxshjwg = GridInf(7)
  393.     Szzls = CxbbGrid.Cols - 1
  394.     
  395.     Me.AutoRedraw = False
  396.     
  397. End Sub
  398. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  399.     
  400.     '卸载打印页面设置窗体
  401.     Unload Dyymctbl
  402. End Sub
  403. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  404.     
  405.     Select Case Button.Key
  406.         Case "bcgs"                                          '保存表格格式
  407.           Call Bcwggs(CxbbGrid, GridCode, GridStr)
  408.         Case "hfmrgs"                                        '恢复默认格式
  409.           Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  410.         Case "szxsxm"                                        '设置显示项目
  411.           Call Szxsxm(CxbbGrid, GridCode)
  412.     End Select
  413. End Sub
  414. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  415.     
  416.     Select Case Button.Key
  417.         Case "ymsz"                                          '页面设置
  418.             Dyymctbl.Show 1
  419.         Case "yl"                                            '预 览
  420.             Call bbyl(True)
  421.         Case "dy"                                            '打 印
  422.             Call bbyl(False)
  423.         Case "fh"                                            '退 出
  424.             Unload Me
  425.         Case "bz"
  426.             SendKeys "{F1}"
  427.      End Select
  428.      
  429. End Sub
  430. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  431.     Timer1.Enabled = False
  432. End Sub
  433. Private Sub Sub_Query()                                    '生成查询结果
  434.     
  435.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  436.     Dim Sqlstr As String                        '查询字符串
  437.     Dim Coljsq As Long                          '网格列计数器
  438.     Dim Jsqte As Integer                        '临时动态计数器
  439.     
  440.     Sqlstr = "SELECT Gdzc_Variation.VariVouCode,Gdzc_Variation.VariDate, " _
  441.         & "Gdzc_Variation.VariationReason, Gdzc_Card.FAName, Gdzc_VariationMode.FAVariName, Gy_Department.DeptName, " _
  442.         & "Gdzc_State.FAStateName, Gdzc_Variation.DeprMethNew,Gdzc_Variation.FAQuantityNew, Gdzc_Variation.FAValueNew, " _
  443.         & "Gdzc_Variation.SumDeprNew, Gdzc_Variation.SalValueNew,Gdzc_Variation.UseYearsNew, Gdzc_Variation.ActivitiesNew, " _
  444.         & "Gdzc_Sort.FASortName FROM Gdzc_Variation LEFT OUTER JOIN Gdzc_Sort ON Gdzc_Variation.FASortNew = Gdzc_Sort.FASortCode LEFT OUTER JOIN " _
  445.         & "Gdzc_State ON Gdzc_Variation.FAStateNew = Gdzc_State.FaStateCode LEFT OUTER JOIN " _
  446.         & "Gy_Department ON Gdzc_Variation.DeptNew = Gy_Department.DeptCode LEFT OUTER JOIN " _
  447.         & "Gdzc_VariationMode ON Gdzc_Variation.FAVariCode = Gdzc_VariationMode.FAVariCode LEFT OUTER JOIN " _
  448.         & "Gdzc_Card ON Gdzc_Variation.CardCode = Gdzc_Card.CardCode"
  449.     Sqlstr = Sqlstr & " where Gdzc_Variation.CardCode='" & Trim(Lbl_Num.Caption) & "' order by Gdzc_Variation.VariVouCode"
  450.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  451.     With Rec_Query
  452.         CxbbGrid.Rows = CxbbGrid.FixedRows
  453.         CxbbGrid.Rows = CxbbGrid.FixedRows + .RecordCount
  454.         Jsqte = CxbbGrid.FixedRows
  455.     
  456.         Do While Not .EOF
  457.             If Jsqte >= CxbbGrid.Rows Then
  458.                 CxbbGrid.AddItem ""
  459.             End If
  460.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(!VariVouCode & "")                         '变动单号
  461.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Format(!varidate, "yyyy-mm-dd")                 '变动日期
  462.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(!VariationReason & "")                     '摘要
  463.             CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(!FAName & "")                              '资产名称
  464.             CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(!FAVariName & "")                          '变动类型
  465.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(!DeptName & "")                            '部门名称
  466.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(!FAStateName & "")                         '使用状况
  467.             Select Case !DeprMethNew                                                                                    '折旧方法
  468.                 Case "01"
  469.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "不计提折旧"
  470.                 Case "02"
  471.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "平均年限法(依净资产计提折旧)"
  472.                 Case "03"
  473.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "平均年限法(依帐面原值计提折旧)"
  474.                 Case "04"
  475.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "工作量法"
  476.                 Case "05"
  477.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "固定折旧额折旧法"
  478.                 Case "06"
  479.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "年数总和法"
  480.                 Case "07"
  481.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = "双倍余额法"
  482.             End Select
  483.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Trim(!FASortName & "")                          '资产类别
  484.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(!FAQuantityNew & "")                       '资产数量
  485.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Trim(!FAValueNew & "")                          '资产原值
  486.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Trim(!SumDeprNew & "")                          '累计折旧
  487.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Trim(!SalValueNew & "")                         '净残值
  488.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = Trim(!UseYearsNew & "")                         '使用年限
  489.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Trim(!ActivitiesNew & "")                        '工作总量
  490.               CxbbGrid.RowHeight(Jsqte) = Sjhgd
  491.             .MoveNext
  492.             Jsqte = Jsqte + 1
  493.         Loop
  494.     End With
  495.     
  496.     '为零时清空单元格
  497.     Call Txt_Clear
  498.     
  499. End Sub
  500. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  501.     
  502.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  503.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  504.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  505.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  506.     ReDim Bbxbt(1 To Bbxbtgs)
  507.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  508.     
  509.     If Bbbwhgs <> 0 Then
  510.         ReDim Bbbwh(1 To Bbbwhgs)
  511.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  512.     End If
  513.     
  514.     Bbzbt = ReportTitle
  515.     Bbxbt(1) = " "
  516.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  517.     
  518.     Bbxbt(1) = Trim(Trim(Label1.Caption) & Trim(Lbl_Num.Caption))
  519.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  520.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  521.   
  522.     If Not bbylte Then
  523.         Unload DY_Tybbyldy
  524.     End If
  525. End Sub
  526. '********************************************************************************
  527. '[>>以下为自定义函数
  528. '为零时清空单元格
  529. Function Txt_Clear()
  530.     Dim Row_Integer, Col_Integer As Integer         '行数和列数变量
  531.     
  532.     For Row_Integer = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  533.         For Col_Integer = 9 To CxbbGrid.Cols - 1
  534.             If Val(CxbbGrid.TextMatrix(Row_Integer, Col_Integer)) = 0 Then
  535.                 CxbbGrid.TextMatrix(Row_Integer, Col_Integer) = ""
  536.             End If
  537.         Next Col_Integer
  538.     Next Row_Integer
  539.     
  540. End Function
  541. '<<]
  542. '****************************************************