上传用户: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 CL_DiscrepancyChange 
  5.    BackColor       =   &H00E9F4FA&
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "差异结转单"
  8.    ClientHeight    =   5865
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   9915
  12.    HelpContextID   =   130402
  13.    Icon            =   "处理_差异结转单.frx":0000
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   5865
  18.    ScaleWidth      =   9915
  19.    ShowInTaskbar   =   0   'False
  20.    StartUpPosition =   2  '屏幕中心
  21.    Begin VB.Timer Timer1 
  22.       Interval        =   1
  23.       Left            =   5070
  24.       Top             =   90
  25.    End
  26.    Begin MSComctlLib.Toolbar GsToolbar 
  27.       Height          =   525
  28.       Left            =   7440
  29.       TabIndex        =   3
  30.       Top             =   30
  31.       Width           =   2475
  32.       _ExtentX        =   4366
  33.       _ExtentY        =   926
  34.       ButtonWidth     =   1455
  35.       ButtonHeight    =   926
  36.       Appearance      =   1
  37.       Style           =   1
  38.       ImageList       =   "ImageList1"
  39.       _Version        =   393216
  40.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  41.          NumButtons      =   3
  42.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  43.             Caption         =   "保存格式"
  44.             Key             =   "bcgs"
  45.             ImageKey        =   "bcgs"
  46.          EndProperty
  47.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  48.             Caption         =   "默认列宽"
  49.             Key             =   "hfmrgs"
  50.             ImageKey        =   "mrlk"
  51.          EndProperty
  52.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  53.             Caption         =   "显示项目"
  54.             Key             =   "szxsxm"
  55.             ImageKey        =   "xsxm"
  56.          EndProperty
  57.       EndProperty
  58.    End
  59.    Begin MSComctlLib.ImageList ImageList1 
  60.       Left            =   6060
  61.       Top             =   30
  62.       _ExtentX        =   1005
  63.       _ExtentY        =   1005
  64.       BackColor       =   -2147483643
  65.       ImageWidth      =   16
  66.       ImageHeight     =   16
  67.       MaskColor       =   12632256
  68.       _Version        =   393216
  69.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  70.          NumListImages   =   32
  71.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  72.             Picture         =   "处理_差异结转单.frx":1042
  73.             Key             =   "sz"
  74.          EndProperty
  75.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  76.             Picture         =   "处理_差异结转单.frx":13DC
  77.             Key             =   "dy"
  78.          EndProperty
  79.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  80.             Picture         =   "处理_差异结转单.frx":1776
  81.             Key             =   "yl"
  82.          EndProperty
  83.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  84.             Picture         =   "处理_差异结转单.frx":1B10
  85.             Key             =   "xg"
  86.          EndProperty
  87.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  88.             Picture         =   "处理_差异结转单.frx":1EAA
  89.             Key             =   "zh"
  90.          EndProperty
  91.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  92.             Picture         =   "处理_差异结转单.frx":2244
  93.             Key             =   "sh"
  94.          EndProperty
  95.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  96.             Picture         =   "处理_差异结转单.frx":25DE
  97.             Key             =   "bc"
  98.          EndProperty
  99.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  100.             Picture         =   "处理_差异结转单.frx":2978
  101.             Key             =   "fq"
  102.          EndProperty
  103.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  104.             Picture         =   "处理_差异结转单.frx":2D12
  105.             Key             =   "bz"
  106.          EndProperty
  107.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  108.             Picture         =   "处理_差异结转单.frx":30AC
  109.             Key             =   "tc"
  110.          EndProperty
  111.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  112.             Picture         =   "处理_差异结转单.frx":3446
  113.             Key             =   "bcgs"
  114.          EndProperty
  115.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  116.             Picture         =   "处理_差异结转单.frx":37E0
  117.             Key             =   "mrlk"
  118.          EndProperty
  119.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  120.             Picture         =   "处理_差异结转单.frx":3B7A
  121.             Key             =   "xsxm"
  122.          EndProperty
  123.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  124.             Picture         =   "处理_差异结转单.frx":3F14
  125.             Key             =   "first"
  126.          EndProperty
  127.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  128.             Picture         =   "处理_差异结转单.frx":42AE
  129.             Key             =   "prev"
  130.          EndProperty
  131.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  132.             Picture         =   "处理_差异结转单.frx":4648
  133.             Key             =   "next"
  134.          EndProperty
  135.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  136.             Picture         =   "处理_差异结转单.frx":49E2
  137.             Key             =   "last"
  138.          EndProperty
  139.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  140.             Picture         =   "处理_差异结转单.frx":4D7C
  141.             Key             =   "xx"
  142.          EndProperty
  143.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  144.             Picture         =   "处理_差异结转单.frx":5116
  145.             Key             =   "define"
  146.          EndProperty
  147.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  148.             Picture         =   "处理_差异结转单.frx":54B0
  149.             Key             =   "exec"
  150.          EndProperty
  151.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  152.             Picture         =   "处理_差异结转单.frx":584A
  153.             Key             =   "xz"
  154.          EndProperty
  155.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  156.             Picture         =   "处理_差异结转单.frx":5BE4
  157.             Key             =   "sc"
  158.          EndProperty
  159.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  160.             Picture         =   "处理_差异结转单.frx":5F7E
  161.             Key             =   "sx"
  162.          EndProperty
  163.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  164.             Picture         =   "处理_差异结转单.frx":6318
  165.             Key             =   "cx"
  166.          EndProperty
  167.          BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  168.             Picture         =   "处理_差异结转单.frx":66B2
  169.             Key             =   "zd"
  170.          EndProperty
  171.          BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  172.             Picture         =   "处理_差异结转单.frx":6A4C
  173.             Key             =   "dz"
  174.          EndProperty
  175.          BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  176.             Picture         =   "处理_差异结转单.frx":6DE6
  177.             Key             =   "ph"
  178.          EndProperty
  179.          BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  180.             Picture         =   "处理_差异结转单.frx":7180
  181.             Key             =   "fz"
  182.          EndProperty
  183.          BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  184.             Picture         =   "处理_差异结转单.frx":751A
  185.             Key             =   "dw"
  186.          EndProperty
  187.          BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  188.             Picture         =   "处理_差异结转单.frx":78B4
  189.             Key             =   "hf"
  190.          EndProperty
  191.          BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  192.             Picture         =   "处理_差异结转单.frx":7C4E
  193.             Key             =   "pz"
  194.          EndProperty
  195.          BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  196.             Picture         =   "处理_差异结转单.frx":7FE8
  197.             Key             =   "check"
  198.          EndProperty
  199.       EndProperty
  200.    End
  201.    Begin MSComctlLib.Toolbar SzToolbar 
  202.       Align           =   1  'Align Top
  203.       Height          =   555
  204.       Left            =   0
  205.       TabIndex        =   4
  206.       Top             =   0
  207.       Width           =   9915
  208.       _ExtentX        =   17489
  209.       _ExtentY        =   979
  210.       ButtonWidth     =   820
  211.       ButtonHeight    =   926
  212.       AllowCustomize  =   0   'False
  213.       Appearance      =   1
  214.       Style           =   1
  215.       ImageList       =   "ImageList1"
  216.       _Version        =   393216
  217.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  218.          NumButtons      =   6
  219.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  220.             Caption         =   "设置"
  221.             Key             =   "ymsz"
  222.             ImageKey        =   "sz"
  223.          EndProperty
  224.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  225.             Caption         =   "打印"
  226.             Key             =   "dy"
  227.             ImageKey        =   "dy"
  228.          EndProperty
  229.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  230.             Caption         =   "预览"
  231.             Key             =   "yl"
  232.             ImageKey        =   "yl"
  233.          EndProperty
  234.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  235.             Style           =   3
  236.          EndProperty
  237.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  238.             Object.Visible         =   0   'False
  239.             Caption         =   "帮助"
  240.             Key             =   "bz"
  241.             ImageKey        =   "bz"
  242.          EndProperty
  243.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  244.             Caption         =   "退出"
  245.             Key             =   "fh"
  246.             ImageKey        =   "tc"
  247.          EndProperty
  248.       EndProperty
  249.       BorderStyle     =   1
  250.    End
  251.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  252.       Height          =   4365
  253.       Left            =   90
  254.       TabIndex        =   5
  255.       Top             =   1380
  256.       Width           =   9735
  257.       _cx             =   5080
  258.       _cy             =   5080
  259.       Appearance      =   1
  260.       BorderStyle     =   1
  261.       Enabled         =   -1  'True
  262.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  263.          Name            =   "宋体"
  264.          Size            =   9
  265.          Charset         =   134
  266.          Weight          =   400
  267.          Underline       =   0   'False
  268.          Italic          =   0   'False
  269.          Strikethrough   =   0   'False
  270.       EndProperty
  271.       MousePointer    =   0
  272.       BackColor       =   16777215
  273.       ForeColor       =   -2147483640
  274.       BackColorFixed  =   13826538
  275.       ForeColorFixed  =   -2147483630
  276.       BackColorSel    =   -2147483635
  277.       ForeColorSel    =   -2147483634
  278.       BackColorBkg    =   -2147483636
  279.       BackColorAlternate=   16777215
  280.       GridColor       =   -2147483633
  281.       GridColorFixed  =   -2147483632
  282.       TreeColor       =   -2147483632
  283.       FloodColor      =   192
  284.       SheetBorder     =   -2147483642
  285.       FocusRect       =   1
  286.       HighLight       =   1
  287.       AllowSelection  =   -1  'True
  288.       AllowBigSelection=   -1  'True
  289.       AllowUserResizing=   0
  290.       SelectionMode   =   0
  291.       GridLines       =   1
  292.       GridLinesFixed  =   2
  293.       GridLineWidth   =   1
  294.       Rows            =   50
  295.       Cols            =   10
  296.       FixedRows       =   1
  297.       FixedCols       =   1
  298.       RowHeightMin    =   0
  299.       RowHeightMax    =   0
  300.       ColWidthMin     =   0
  301.       ColWidthMax     =   0
  302.       ExtendLastCol   =   0   'False
  303.       FormatString    =   ""
  304.       ScrollTrack     =   0   'False
  305.       ScrollBars      =   3
  306.       ScrollTips      =   0   'False
  307.       MergeCells      =   0
  308.       MergeCompare    =   0
  309.       AutoResize      =   -1  'True
  310.       AutoSizeMode    =   0
  311.       AutoSearch      =   0
  312.       AutoSearchDelay =   2
  313.       MultiTotals     =   -1  'True
  314.       SubtotalPosition=   0
  315.       OutlineBar      =   0
  316.       OutlineCol      =   0
  317.       Ellipsis        =   0
  318.       ExplorerBar     =   0
  319.       PicturesOver    =   0   'False
  320.       FillStyle       =   0
  321.       RightToLeft     =   0   'False
  322.       PictureType     =   0
  323.       TabBehavior     =   0
  324.       OwnerDraw       =   0
  325.       Editable        =   0
  326.       ShowComboButton =   1
  327.       WordWrap        =   0   'False
  328.       TextStyle       =   0
  329.       TextStyleFixed  =   0
  330.       OleDragMode     =   0
  331.       OleDropMode     =   0
  332.       DataMode        =   0
  333.       VirtualData     =   -1  'True
  334.       DataMember      =   ""
  335.       ComboSearch     =   3
  336.       AutoSizeMouse   =   -1  'True
  337.       FrozenRows      =   0
  338.       FrozenCols      =   0
  339.       AllowUserFreezing=   0
  340.       BackColorFrozen =   0
  341.       ForeColorFrozen =   0
  342.       WallPaperAlignment=   9
  343.       AccessibleName  =   ""
  344.       AccessibleDescription=   ""
  345.       AccessibleValue =   ""
  346.       AccessibleRole  =   24
  347.    End
  348.    Begin VB.Label lbl_TsLabel 
  349.       AutoSize        =   -1  'True
  350.       BackColor       =   &H80000018&
  351.       BackStyle       =   0  'Transparent
  352.       Caption         =   "差异结转单"
  353.       BeginProperty Font 
  354.          Name            =   "宋体"
  355.          Size            =   14.25
  356.          Charset         =   134
  357.          Weight          =   700
  358.          Underline       =   0   'False
  359.          Italic          =   0   'False
  360.          Strikethrough   =   0   'False
  361.       EndProperty
  362.       ForeColor       =   &H00000000&
  363.       Height          =   285
  364.       Index           =   0
  365.       Left            =   4260
  366.       TabIndex        =   2
  367.       Top             =   810
  368.       Width           =   1500
  369.    End
  370.    Begin VB.Label lbl_TsLabel 
  371.       AutoSize        =   -1  'True
  372.       BackStyle       =   0  'Transparent
  373.       Caption         =   "月份:"
  374.       BeginProperty Font 
  375.          Name            =   "宋体"
  376.          Size            =   9
  377.          Charset         =   0
  378.          Weight          =   400
  379.          Underline       =   0   'False
  380.          Italic          =   0   'False
  381.          Strikethrough   =   0   'False
  382.       EndProperty
  383.       Height          =   240
  384.       Index           =   1
  385.       Left            =   270
  386.       TabIndex        =   1
  387.       Top             =   1080
  388.       Width           =   480
  389.    End
  390.    Begin VB.Label lbl_Tstext 
  391.       AutoSize        =   -1  'True
  392.       BackStyle       =   0  'Transparent
  393.       Caption         =   "月份"
  394.       BeginProperty Font 
  395.          Name            =   "宋体"
  396.          Size            =   9
  397.          Charset         =   0
  398.          Weight          =   400
  399.          Underline       =   0   'False
  400.          Italic          =   0   'False
  401.          Strikethrough   =   0   'False
  402.       EndProperty
  403.       Height          =   180
  404.       Index           =   0
  405.       Left            =   810
  406.       TabIndex        =   0
  407.       Top             =   1080
  408.       Width           =   1170
  409.    End
  410. End
  411. Attribute VB_Name = "CL_DiscrepancyChange"
  412. Attribute VB_GlobalNameSpace = False
  413. Attribute VB_Creatable = False
  414. Attribute VB_PredeclaredId = True
  415. Attribute VB_Exposed = False
  416. '**************************************************************************
  417. '*    模 块 名 称 :差异结转单
  418. '*    功 能 描 述 :
  419. '*    程序员姓名  :杨波
  420. '*    最后修改人  :杨波
  421. '*    最后修改时间:2001/12/06
  422. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  423. '**************************************************************************
  424. Dim ReportTitle As String                '报表主标题
  425. Dim mQuery_cond As String
  426. '以下为固定使用变量
  427. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  428. Dim GridCode As String                   '显示网格网格代码
  429. Dim GridInf() As Variant                 '整个网格设置信息
  430. Dim Tsxx As String                       '系统提示信息
  431. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  432. Dim Sjhgd As Double                      '网格数据行高度
  433. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  434. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  435. Dim GridStr()  As String                 '网格列信息(字符型)
  436. Dim GridInt() As Integer                 '网格列信息(整型)
  437. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  438. Private Sub Form_Load()                                                   '窗体装入
  439.   
  440.     '调入打印页面设置窗体
  441.     ReportTitle = "差异结转单"
  442.     XtReportCode = "Chhs_DiscrepancyChange"
  443.     Load Dyymctbl
  444.       
  445.     '调 入 网 格(Fixed)
  446.     GridCode = "Chhs_DiscrepancyChange"
  447.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  448.       
  449.     Qslz = GridInf(1)
  450.     Sjhgd = GridInf(2)
  451.     Sfxshjwg = GridInf(7)
  452.     Szzls = CxbbGrid.Cols - 1
  453.        
  454. End Sub
  455. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  456.     '卸载打印页面设置窗体
  457.     Unload Dyymctbl
  458. End Sub
  459. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  460.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  461. End Sub
  462. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  463.   
  464.     Select Case Button.Key
  465.         Case "bcgs"                                          '保存表格格式
  466.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  467.         Case "hfmrgs"                                        '恢复默认格式
  468.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  469.         Case "szxsxm"                                        '设置显示项目
  470.             Call Szxsxm(CxbbGrid, GridCode)
  471.     End Select
  472. End Sub
  473. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  474.     
  475.     Select Case Button.Key
  476.         Case "ymsz"                                          '页面设置
  477.             Dyymctbl.Show 1
  478.         Case "yl"                                            '预 览
  479.             Call bbyl(True)
  480.         Case "dy"                                            '打 印
  481.             Call bbyl(False)
  482.         Case "bz"                                            '帮 助
  483.             Call F1bz
  484.         Case "fh"                                            '退 出
  485.            Unload Me
  486.     End Select
  487. End Sub
  488. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  489.     
  490.     Timer1.Enabled = False
  491.    
  492.     '加快显示速度
  493.     CxbbGrid.Redraw = False
  494.  
  495.     '生成查询结果
  496.     Call Sub_Query
  497.    
  498.     CxbbGrid.Redraw = True
  499.     
  500. End Sub
  501. Private Sub Sub_Query()                                     '生成查询结果(Define)
  502.     
  503.     Dim Rec_Query As New ADODB.Recordset                     '查询结果动态集
  504.     Dim Rec_Queryfz As New ADODB.Recordset
  505.     Dim SqlStr As String
  506.     Dim SQLstr1 As String
  507.     '以下为用户自定义部分[
  508.     SqlStr = "SELECT * FROM Chhs_V_DiffBill WHERE KjYear='" & PGKjYear & "' AND Period='" & Val(lbl_Tstext(0).Tag) & "' and " & mQuery_cond & " ORDER BY  WhCode,MNumber"
  509.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  510.  
  511.     With Rec_Query
  512.     
  513.         CxbbGrid.Rows = CxbbGrid.FixedRows
  514.         CxbbGrid.Rows = CxbbGrid.FixedRows + .RecordCount
  515.         Jsqte = CxbbGrid.FixedRows
  516.         
  517.         Do While Not .EOF
  518.             If Jsqte >= CxbbGrid.Rows Then
  519.                 CxbbGrid.AddItem ""
  520.             End If
  521.             
  522.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("WhName") & "")
  523.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("MNumber") & "")
  524.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("MName") & "")
  525.             If Not IsNull(.Fields("Quan")) Then
  526.                 If Not .Fields("Quan") = 0 Then
  527.                     CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("Quan"))
  528.                 End If
  529.             End If
  530.             If Not IsNull(.Fields("PlanMoney")) Then
  531.                 If Not .Fields("PlanMoney") = 0 Then
  532.                     CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("PlanMoney"))
  533.                 End If
  534.             End If
  535.             If Not IsNull(.Fields("DiffMoney")) Then
  536.                 If Not .Fields("DiffMoney") = 0 Then
  537.                     CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("DiffMoney"))
  538.                 End If
  539.             End If
  540.             If Not IsNull(.Fields("DiffLv")) Then
  541.                 If Not .Fields("DiffLv") = 0 Then
  542.                     CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("DiffLv"))
  543.                 End If
  544.             End If
  545.             
  546.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  547.             Jsqte = Jsqte + 1
  548.             .MoveNext
  549.         Loop
  550.     End With
  551. End Sub
  552. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  553.     
  554.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  555.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  556.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  557.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  558.     ReDim Bbxbt(1 To Bbxbtgs)
  559.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  560.     If Bbbwhgs <> 0 Then
  561.         ReDim Bbbwh(1 To Bbbwhgs)
  562.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  563.     End If
  564.     Bbzbt = ReportTitle
  565.     Bbxbt(1) = "月份:" + Trim(lbl_Tstext(0))
  566.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  567.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  568.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  569.     If Not bbylte Then
  570.         Unload DY_Tybbyldy
  571.     End If
  572. End Sub
  573. Public Property Let Query_Cond(ByVal vNewValue As Variant)
  574.     mQuery_cond = vNewValue
  575. End Property