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

企业管理

开发平台:

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 Tjfx_IncbFx 
  5.    BackColor       =   &H80000000&
  6.    Caption         =   "入库成本分析"
  7.    ClientHeight    =   6180
  8.    ClientLeft      =   60
  9.    ClientTop       =   345
  10.    ClientWidth     =   11580
  11.    HelpContextID   =   130608
  12.    Icon            =   "统计分析_入库成本分析.frx":0000
  13.    KeyPreview      =   -1  'True
  14.    LinkTopic       =   "Form1"
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   6180
  17.    ScaleWidth      =   11580
  18.    WindowState     =   2  'Maximized
  19.    Begin VB.PictureBox Pic_Title 
  20.       BackColor       =   &H00FFFFFF&
  21.       Height          =   795
  22.       Left            =   0
  23.       Picture         =   "统计分析_入库成本分析.frx":1042
  24.       ScaleHeight     =   735
  25.       ScaleWidth      =   11715
  26.       TabIndex        =   0
  27.       Top             =   570
  28.       Width           =   11775
  29.       Begin VB.OptionButton Opt_Selbb 
  30.          BackColor       =   &H8000000E&
  31.          Caption         =   "横向输出入库类别"
  32.          Height          =   285
  33.          Index           =   1
  34.          Left            =   9600
  35.          TabIndex        =   6
  36.          Top             =   390
  37.          Visible         =   0   'False
  38.          Width           =   1815
  39.       End
  40.       Begin VB.OptionButton Opt_Selbb 
  41.          BackColor       =   &H8000000E&
  42.          Caption         =   "横向输出月份"
  43.          Height          =   285
  44.          Index           =   0
  45.          Left            =   9600
  46.          TabIndex        =   5
  47.          Top             =   120
  48.          Value           =   -1  'True
  49.          Visible         =   0   'False
  50.          Width           =   1485
  51.       End
  52.       Begin VB.Label Lab_Title 
  53.          AutoSize        =   -1  'True
  54.          BackColor       =   &H80000018&
  55.          BackStyle       =   0  'Transparent
  56.          Caption         =   "入库成本分析表"
  57.          BeginProperty Font 
  58.             Name            =   "宋体"
  59.             Size            =   12
  60.             Charset         =   134
  61.             Weight          =   700
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          ForeColor       =   &H00000000&
  67.          Height          =   240
  68.          Index           =   0
  69.          Left            =   480
  70.          TabIndex        =   1
  71.          Top             =   210
  72.          Width           =   1785
  73.       End
  74.    End
  75.    Begin VB.Timer Timer1 
  76.       Enabled         =   0   'False
  77.       Interval        =   1
  78.       Left            =   7620
  79.       Top             =   90
  80.    End
  81.    Begin MSComctlLib.Toolbar GsToolbar 
  82.       Height          =   525
  83.       Left            =   9330
  84.       TabIndex        =   2
  85.       Top             =   30
  86.       Width           =   2475
  87.       _ExtentX        =   4366
  88.       _ExtentY        =   926
  89.       ButtonWidth     =   1455
  90.       ButtonHeight    =   926
  91.       Appearance      =   1
  92.       Style           =   1
  93.       ImageList       =   "ImageList2"
  94.       _Version        =   393216
  95.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  96.          NumButtons      =   3
  97.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  98.             Caption         =   "保存格式"
  99.             Key             =   "bcgs"
  100.             ImageKey        =   "bcgs"
  101.          EndProperty
  102.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  103.             Caption         =   "默认列宽"
  104.             Key             =   "hfmrgs"
  105.             ImageKey        =   "mrlk"
  106.          EndProperty
  107.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  108.             Caption         =   "显示项目"
  109.             Key             =   "szxsxm"
  110.             ImageKey        =   "xsxm"
  111.          EndProperty
  112.       EndProperty
  113.    End
  114.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  115.       Height          =   7545
  116.       Left            =   90
  117.       TabIndex        =   3
  118.       Top             =   1440
  119.       Width           =   11775
  120.       _cx             =   5080
  121.       _cy             =   5080
  122.       Appearance      =   1
  123.       BorderStyle     =   1
  124.       Enabled         =   -1  'True
  125.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  126.          Name            =   "宋体"
  127.          Size            =   9
  128.          Charset         =   134
  129.          Weight          =   400
  130.          Underline       =   0   'False
  131.          Italic          =   0   'False
  132.          Strikethrough   =   0   'False
  133.       EndProperty
  134.       MousePointer    =   0
  135.       BackColor       =   16777215
  136.       ForeColor       =   -2147483640
  137.       BackColorFixed  =   13826538
  138.       ForeColorFixed  =   -2147483630
  139.       BackColorSel    =   -2147483635
  140.       ForeColorSel    =   -2147483634
  141.       BackColorBkg    =   -2147483636
  142.       BackColorAlternate=   16777215
  143.       GridColor       =   -2147483633
  144.       GridColorFixed  =   -2147483632
  145.       TreeColor       =   -2147483632
  146.       FloodColor      =   192
  147.       SheetBorder     =   -2147483642
  148.       FocusRect       =   1
  149.       HighLight       =   1
  150.       AllowSelection  =   -1  'True
  151.       AllowBigSelection=   -1  'True
  152.       AllowUserResizing=   0
  153.       SelectionMode   =   0
  154.       GridLines       =   1
  155.       GridLinesFixed  =   2
  156.       GridLineWidth   =   1
  157.       Rows            =   50
  158.       Cols            =   10
  159.       FixedRows       =   1
  160.       FixedCols       =   1
  161.       RowHeightMin    =   0
  162.       RowHeightMax    =   0
  163.       ColWidthMin     =   0
  164.       ColWidthMax     =   0
  165.       ExtendLastCol   =   0   'False
  166.       FormatString    =   ""
  167.       ScrollTrack     =   0   'False
  168.       ScrollBars      =   3
  169.       ScrollTips      =   0   'False
  170.       MergeCells      =   0
  171.       MergeCompare    =   0
  172.       AutoResize      =   -1  'True
  173.       AutoSizeMode    =   0
  174.       AutoSearch      =   0
  175.       AutoSearchDelay =   2
  176.       MultiTotals     =   -1  'True
  177.       SubtotalPosition=   1
  178.       OutlineBar      =   0
  179.       OutlineCol      =   0
  180.       Ellipsis        =   0
  181.       ExplorerBar     =   0
  182.       PicturesOver    =   0   'False
  183.       FillStyle       =   0
  184.       RightToLeft     =   0   'False
  185.       PictureType     =   0
  186.       TabBehavior     =   0
  187.       OwnerDraw       =   0
  188.       Editable        =   0
  189.       ShowComboButton =   1
  190.       WordWrap        =   0   'False
  191.       TextStyle       =   0
  192.       TextStyleFixed  =   0
  193.       OleDragMode     =   0
  194.       OleDropMode     =   0
  195.       DataMode        =   0
  196.       VirtualData     =   -1  'True
  197.       DataMember      =   ""
  198.       ComboSearch     =   3
  199.       AutoSizeMouse   =   -1  'True
  200.       FrozenRows      =   0
  201.       FrozenCols      =   0
  202.       AllowUserFreezing=   0
  203.       BackColorFrozen =   0
  204.       ForeColorFrozen =   0
  205.       WallPaperAlignment=   9
  206.       AccessibleName  =   ""
  207.       AccessibleDescription=   ""
  208.       AccessibleValue =   ""
  209.       AccessibleRole  =   24
  210.       Begin MSComctlLib.ImageList ImageList2 
  211.          Left            =   0
  212.          Top             =   0
  213.          _ExtentX        =   1005
  214.          _ExtentY        =   1005
  215.          BackColor       =   -2147483643
  216.          ImageWidth      =   16
  217.          ImageHeight     =   16
  218.          MaskColor       =   12632256
  219.          _Version        =   393216
  220.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  221.             NumListImages   =   40
  222.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  223.                Picture         =   "统计分析_入库成本分析.frx":35106
  224.                Key             =   "sz"
  225.             EndProperty
  226.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  227.                Picture         =   "统计分析_入库成本分析.frx":354A0
  228.                Key             =   "dy"
  229.             EndProperty
  230.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  231.                Picture         =   "统计分析_入库成本分析.frx":3583A
  232.                Key             =   "yl"
  233.             EndProperty
  234.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  235.                Picture         =   "统计分析_入库成本分析.frx":35BD4
  236.                Key             =   "xg"
  237.             EndProperty
  238.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  239.                Picture         =   "统计分析_入库成本分析.frx":35F6E
  240.                Key             =   "zh"
  241.             EndProperty
  242.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  243.                Picture         =   "统计分析_入库成本分析.frx":36308
  244.                Key             =   "sh"
  245.             EndProperty
  246.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  247.                Picture         =   "统计分析_入库成本分析.frx":366A2
  248.                Key             =   "bc"
  249.             EndProperty
  250.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  251.                Picture         =   "统计分析_入库成本分析.frx":36A3C
  252.                Key             =   "fq"
  253.             EndProperty
  254.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  255.                Picture         =   "统计分析_入库成本分析.frx":36DD6
  256.                Key             =   "bz"
  257.             EndProperty
  258.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  259.                Picture         =   "统计分析_入库成本分析.frx":37170
  260.                Key             =   "tc"
  261.             EndProperty
  262.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  263.                Picture         =   "统计分析_入库成本分析.frx":3750A
  264.                Key             =   "bcgs"
  265.             EndProperty
  266.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  267.                Picture         =   "统计分析_入库成本分析.frx":378A4
  268.                Key             =   "mrlk"
  269.             EndProperty
  270.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  271.                Picture         =   "统计分析_入库成本分析.frx":37C3E
  272.                Key             =   "xsxm"
  273.             EndProperty
  274.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  275.                Picture         =   "统计分析_入库成本分析.frx":37FD8
  276.                Key             =   "first"
  277.             EndProperty
  278.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  279.                Picture         =   "统计分析_入库成本分析.frx":38372
  280.                Key             =   "prev"
  281.             EndProperty
  282.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  283.                Picture         =   "统计分析_入库成本分析.frx":3870C
  284.                Key             =   "next"
  285.             EndProperty
  286.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  287.                Picture         =   "统计分析_入库成本分析.frx":38AA6
  288.                Key             =   "last"
  289.             EndProperty
  290.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  291.                Picture         =   "统计分析_入库成本分析.frx":38E40
  292.                Key             =   "xx"
  293.             EndProperty
  294.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  295.                Picture         =   "统计分析_入库成本分析.frx":391DA
  296.                Key             =   "define"
  297.             EndProperty
  298.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  299.                Picture         =   "统计分析_入库成本分析.frx":39574
  300.                Key             =   "exec"
  301.             EndProperty
  302.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  303.                Picture         =   "统计分析_入库成本分析.frx":3990E
  304.                Key             =   "xz"
  305.             EndProperty
  306.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  307.                Picture         =   "统计分析_入库成本分析.frx":39CA8
  308.                Key             =   "sc"
  309.             EndProperty
  310.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  311.                Picture         =   "统计分析_入库成本分析.frx":3A042
  312.                Key             =   "sx"
  313.             EndProperty
  314.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  315.                Picture         =   "统计分析_入库成本分析.frx":3A3DC
  316.                Key             =   "cx"
  317.             EndProperty
  318.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  319.                Picture         =   "统计分析_入库成本分析.frx":3A776
  320.                Key             =   "zd"
  321.             EndProperty
  322.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  323.                Picture         =   "统计分析_入库成本分析.frx":3AB10
  324.                Key             =   "dz"
  325.             EndProperty
  326.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  327.                Picture         =   "统计分析_入库成本分析.frx":3AEAA
  328.                Key             =   "ph"
  329.             EndProperty
  330.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  331.                Picture         =   "统计分析_入库成本分析.frx":3B244
  332.                Key             =   "fz"
  333.             EndProperty
  334.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  335.                Picture         =   "统计分析_入库成本分析.frx":3B5DE
  336.                Key             =   "dw"
  337.             EndProperty
  338.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  339.                Picture         =   "统计分析_入库成本分析.frx":3B978
  340.                Key             =   "hf"
  341.             EndProperty
  342.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  343.                Picture         =   "统计分析_入库成本分析.frx":3BD12
  344.                Key             =   "pz"
  345.             EndProperty
  346.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  347.                Picture         =   "统计分析_入库成本分析.frx":3C0AC
  348.                Key             =   "check"
  349.             EndProperty
  350.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  351.                Picture         =   "统计分析_入库成本分析.frx":3C446
  352.                Key             =   "qs"
  353.             EndProperty
  354.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  355.                Picture         =   "统计分析_入库成本分析.frx":3C7E0
  356.                Key             =   "fullcheck"
  357.             EndProperty
  358.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  359.                Picture         =   "统计分析_入库成本分析.frx":3CB7A
  360.                Key             =   "qq"
  361.             EndProperty
  362.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  363.                Picture         =   "统计分析_入库成本分析.frx":3CF14
  364.                Key             =   "bcw"
  365.             EndProperty
  366.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  367.                Picture         =   "统计分析_入库成本分析.frx":3D2AE
  368.                Key             =   "ye"
  369.             EndProperty
  370.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  371.                Picture         =   "统计分析_入库成本分析.frx":3D648
  372.                Key             =   ""
  373.             EndProperty
  374.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  375.                Picture         =   "统计分析_入库成本分析.frx":3D9E2
  376.                Key             =   "frist"
  377.             EndProperty
  378.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  379.                Picture         =   "统计分析_入库成本分析.frx":3DD7C
  380.                Key             =   "dj"
  381.             EndProperty
  382.          EndProperty
  383.       End
  384.    End
  385.    Begin MSComctlLib.Toolbar SzToolbar 
  386.       Align           =   1  'Align Top
  387.       Height          =   555
  388.       Left            =   0
  389.       TabIndex        =   4
  390.       Top             =   0
  391.       Width           =   11580
  392.       _ExtentX        =   20426
  393.       _ExtentY        =   979
  394.       ButtonWidth     =   820
  395.       ButtonHeight    =   926
  396.       AllowCustomize  =   0   'False
  397.       Appearance      =   1
  398.       Style           =   1
  399.       ImageList       =   "ImageList1"
  400.       _Version        =   393216
  401.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  402.          NumButtons      =   8
  403.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  404.             Caption         =   "设置"
  405.             Key             =   "ymsz"
  406.             ImageKey        =   "sz"
  407.          EndProperty
  408.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  409.             Caption         =   "打印"
  410.             Key             =   "dy"
  411.             ImageKey        =   "dy"
  412.          EndProperty
  413.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  414.             Caption         =   "预览"
  415.             Key             =   "yl"
  416.             ImageKey        =   "yl"
  417.          EndProperty
  418.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  419.             Style           =   3
  420.          EndProperty
  421.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  422.             Caption         =   "查询"
  423.             Key             =   "cx"
  424.             ImageKey        =   "cx"
  425.          EndProperty
  426.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  427.             Style           =   3
  428.          EndProperty
  429.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  430.             Caption         =   "帮助"
  431.             Key             =   "bz"
  432.             ImageKey        =   "bz"
  433.          EndProperty
  434.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  435.             Caption         =   "退出"
  436.             Key             =   "fh"
  437.             ImageKey        =   "tc"
  438.          EndProperty
  439.       EndProperty
  440.       BorderStyle     =   1
  441.       Begin MSComctlLib.ImageList ImageList1 
  442.          Left            =   6000
  443.          Top             =   0
  444.          _ExtentX        =   1005
  445.          _ExtentY        =   1005
  446.          BackColor       =   -2147483643
  447.          ImageWidth      =   16
  448.          ImageHeight     =   16
  449.          MaskColor       =   12632256
  450.          _Version        =   393216
  451.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  452.             NumListImages   =   41
  453.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "统计分析_入库成本分析.frx":3E116
  455.                Key             =   "sz"
  456.             EndProperty
  457.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "统计分析_入库成本分析.frx":3E4B0
  459.                Key             =   "dy"
  460.             EndProperty
  461.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "统计分析_入库成本分析.frx":3E84A
  463.                Key             =   "yl"
  464.             EndProperty
  465.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "统计分析_入库成本分析.frx":3EBE4
  467.                Key             =   "xg"
  468.             EndProperty
  469.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "统计分析_入库成本分析.frx":3EF7E
  471.                Key             =   "zh"
  472.             EndProperty
  473.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "统计分析_入库成本分析.frx":3F318
  475.                Key             =   "sh"
  476.             EndProperty
  477.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "统计分析_入库成本分析.frx":3F6B2
  479.                Key             =   "bc"
  480.             EndProperty
  481.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "统计分析_入库成本分析.frx":3FA4C
  483.                Key             =   "fq"
  484.             EndProperty
  485.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "统计分析_入库成本分析.frx":3FDE6
  487.                Key             =   "bz"
  488.             EndProperty
  489.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "统计分析_入库成本分析.frx":40180
  491.                Key             =   "tc"
  492.             EndProperty
  493.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "统计分析_入库成本分析.frx":4051A
  495.                Key             =   "bcgs"
  496.             EndProperty
  497.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "统计分析_入库成本分析.frx":408B4
  499.                Key             =   "mrlk"
  500.             EndProperty
  501.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "统计分析_入库成本分析.frx":40C4E
  503.                Key             =   "xsxm"
  504.             EndProperty
  505.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "统计分析_入库成本分析.frx":40FE8
  507.                Key             =   "first"
  508.             EndProperty
  509.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "统计分析_入库成本分析.frx":41382
  511.                Key             =   "prev"
  512.             EndProperty
  513.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "统计分析_入库成本分析.frx":4171C
  515.                Key             =   "next"
  516.             EndProperty
  517.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "统计分析_入库成本分析.frx":41AB6
  519.                Key             =   "last"
  520.             EndProperty
  521.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "统计分析_入库成本分析.frx":41E50
  523.                Key             =   "xx"
  524.             EndProperty
  525.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "统计分析_入库成本分析.frx":421EA
  527.                Key             =   "define"
  528.             EndProperty
  529.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "统计分析_入库成本分析.frx":42584
  531.                Key             =   "exec"
  532.             EndProperty
  533.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "统计分析_入库成本分析.frx":4291E
  535.                Key             =   "xz"
  536.             EndProperty
  537.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "统计分析_入库成本分析.frx":42CB8
  539.                Key             =   "sc"
  540.             EndProperty
  541.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "统计分析_入库成本分析.frx":43052
  543.                Key             =   "sx"
  544.             EndProperty
  545.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "统计分析_入库成本分析.frx":433EC
  547.                Key             =   "cx"
  548.             EndProperty
  549.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "统计分析_入库成本分析.frx":43786
  551.                Key             =   "zd"
  552.             EndProperty
  553.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "统计分析_入库成本分析.frx":43B20
  555.                Key             =   "dz"
  556.             EndProperty
  557.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "统计分析_入库成本分析.frx":43EBA
  559.                Key             =   "ph"
  560.             EndProperty
  561.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "统计分析_入库成本分析.frx":44254
  563.                Key             =   "fz"
  564.             EndProperty
  565.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "统计分析_入库成本分析.frx":445EE
  567.                Key             =   "dw"
  568.             EndProperty
  569.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.                Picture         =   "统计分析_入库成本分析.frx":44988
  571.                Key             =   "hf"
  572.             EndProperty
  573.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  574.                Picture         =   "统计分析_入库成本分析.frx":44D22
  575.                Key             =   "pz"
  576.             EndProperty
  577.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  578.                Picture         =   "统计分析_入库成本分析.frx":450BC
  579.                Key             =   "check"
  580.             EndProperty
  581.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  582.                Picture         =   "统计分析_入库成本分析.frx":45456
  583.                Key             =   "mx"
  584.             EndProperty
  585.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  586.                Picture         =   "统计分析_入库成本分析.frx":457F0
  587.                Key             =   "jz"
  588.             EndProperty
  589.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  590.                Picture         =   "统计分析_入库成本分析.frx":45B8A
  591.                Key             =   "hz"
  592.             EndProperty
  593.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  594.                Picture         =   "统计分析_入库成本分析.frx":45F24
  595.                Key             =   "dj"
  596.             EndProperty
  597.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  598.                Picture         =   "统计分析_入库成本分析.frx":462BE
  599.                Key             =   "cy"
  600.             EndProperty
  601.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  602.                Picture         =   "统计分析_入库成本分析.frx":46658
  603.                Key             =   "zhh"
  604.             EndProperty
  605.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  606.                Picture         =   "统计分析_入库成本分析.frx":469F2
  607.                Key             =   "a"
  608.             EndProperty
  609.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  610.                Picture         =   "统计分析_入库成本分析.frx":46D8C
  611.                Key             =   "b"
  612.             EndProperty
  613.             BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  614.                Picture         =   "统计分析_入库成本分析.frx":47126
  615.                Key             =   "c"
  616.             EndProperty
  617.          EndProperty
  618.       End
  619.    End
  620. End
  621. Attribute VB_Name = "Tjfx_IncbFx"
  622. Attribute VB_GlobalNameSpace = False
  623. Attribute VB_Creatable = False
  624. Attribute VB_PredeclaredId = True
  625. Attribute VB_Exposed = False
  626. '**************************************************************************
  627. '*    模 块 名 称 :入库成本分析
  628. '*    功 能 描 述 :
  629. '*    程序员姓名  :白凤英
  630. '*    最后修改人  :白凤英
  631. '*    最后修改时间:2001/12/19
  632. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  633. '**************************************************************************
  634. Dim ReportTitle As String                '报表主标题
  635. Dim Str_QueryCondi As String             '用户录入查询条件
  636. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  637. Dim FlCond As String                     '分类条件
  638. '以下为固定使用变量
  639. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  640. Dim GridCode As String                   '显示网格网格代码
  641. Dim GridInf() As Variant                 '整个网格设置信息
  642. Dim Tsxx As String                       '系统提示信息
  643. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  644. Dim Sjhgd As Double                      '网格数据行高度
  645. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  646. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  647. Dim GridStr()  As String                 '网格列信息(字符型)
  648. Dim GridInt() As Integer                 '网格列信息(整型)
  649. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  650. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  651.     On Error Resume Next
  652.     With CxbbGrid
  653.         .Width = Me.Width - 160
  654.         .Height = Me.Height - .Top - 400
  655.     End With
  656.     With Pic_Title
  657.         .Width = Me.Width - 160
  658.     End With
  659.     
  660.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  661. End Sub
  662. Private Sub Form_Load()                                                   '窗体装入
  663.   
  664.     '调入打印页面设置窗体
  665.     ReportTitle = "入库成本分析表"
  666.     XtReportCode = "Chhs_Incbfx"
  667.     Load Dyymctbl
  668.       
  669.     '调整标题栏及网格、格式工具条位置(Fixed)
  670.     Pic_Title.Left = 40
  671.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  672.     CxbbGrid.Left = Pic_Title.Left
  673.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  674.      
  675.     '调 入 网 格(Fixed)
  676.     GridCode = "Chhs_IncbFx"
  677.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  678.       
  679.     Qslz = GridInf(1)
  680.     Sjhgd = GridInf(2)
  681.     Sfxshjwg = GridInf(7)
  682.     Szzls = CxbbGrid.Cols - 1
  683.     
  684.     Opt_Selbb(0).Tag = GridCode
  685.     Opt_Selbb(1).Tag = "Chhs_IncbFx1"
  686.     
  687. End Sub
  688. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  689.     '卸载条件窗体
  690.     Tjfx_IncbFxCond.UnloadCheck.Value = 1
  691.     Unload Tjfx_IncbFxCond
  692.     
  693.     '卸载打印页面设置窗体
  694.     Unload Dyymctbl
  695. End Sub
  696. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  697.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  698. End Sub
  699. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  700.   
  701.     Select Case Button.Key
  702.         Case "bcgs"                                          '保存表格格式
  703.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  704.         Case "hfmrgs"                                        '恢复默认格式
  705.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  706.         Case "szxsxm"                                        '设置显示项目
  707.             Call Szxsxm(CxbbGrid, GridCode)
  708.     End Select
  709. End Sub
  710. Private Sub Opt_Selbb_Click(Index As Integer)
  711. Dim Rectemp As Recordset
  712. Dim RecTempFz As New ADODB.Recordset
  713.     If Not Opt_Selbb(Index).Tag = GridCode Then
  714.         
  715.         '更新表头
  716.         GridCode = Opt_Selbb(Index).Tag
  717.         Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  718.         Qslz = GridInf(1)
  719.         Sjhgd = GridInf(2)
  720.         Sfxshjwg = GridInf(7)
  721.         Szzls = CxbbGrid.Cols - 1
  722.         
  723.         If GridCode = "Chhs_IncbFx1" Then
  724.             Set Rectemp = Cw_DataEnvi.DataConnect.Execute("select inoutclassname from gy_inoutclass where inoutflag=1 order by inoutclasscode")
  725.             If Not Rectemp.EOF Then
  726.                 
  727.                 With CxbbGrid
  728.                     Coljsq = .Cols
  729.                     .Cols = .Cols + Rectemp.RecordCount + 1
  730.                     Do While Not Rectemp.EOF
  731.                         .TextMatrix(0, Coljsq) = Trim(Rectemp.Fields("inoutclassname") & "")
  732.                         .ColAlignment(Coljsq) = 6
  733.                         .FixedAlignment(Coljsq) = flexAlignCenterCenter
  734.                         .ColFormat(Coljsq) = .ColFormat(Sydz("002", GridStr(), .Cols - 1))
  735.                         .ColWidth(Coljsq) = .ColWidth(Sydz("002", GridStr(), .Cols - 1))
  736.                         Rectemp.MoveNext
  737.                         Coljsq = Coljsq + 1
  738.                     Loop
  739.                     .TextMatrix(0, Coljsq) = "合计"
  740.                     .ColAlignment(Coljsq) = 6
  741.                     .FixedAlignment(Coljsq) = flexAlignCenterCenter
  742.                     .ColFormat(Coljsq) = .ColFormat(Sydz("002", GridStr(), .Cols - 1))
  743.                     .ColWidth(Coljsq) = .ColWidth(Sydz("002", GridStr(), .Cols - 1))
  744.                 End With
  745.             End If
  746.             SzToolbar.Buttons("cx").Enabled = False
  747.         Else
  748.             SzToolbar.Buttons("cx").Enabled = True
  749.         End If
  750.         
  751.         '填充网格内容
  752.         If Opt_Selbb(0).Value Then
  753.             Call Sub_Query
  754.         Else
  755.             Call Sub_QueryFz
  756.         End If
  757.     End If
  758.     
  759.         
  760. End Sub
  761. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  762.     
  763.     Select Case Button.Key
  764.         Case "ymsz"                                          '页面设置
  765.             Dyymctbl.Show 1
  766.         Case "yl"                                            '预 览
  767.             Call bbyl(True)
  768.         Case "dy"                                            '打 印
  769.             Call bbyl(False)
  770.         Case "cx"                                            '查 询
  771.             Tjfx_IncbFxCond.Show 1
  772.         Case "bz"                                            '帮 助
  773.             Call F1bz
  774.         Case "fh"                                            '退 出
  775.            Unload Me
  776.     End Select
  777. End Sub
  778. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  779.     
  780.     Timer1.Enabled = False
  781.     Xt_Wait.Show
  782.     Xt_Wait.Refresh
  783.    
  784.     '加快显示速度
  785.     CxbbGrid.Redraw = False
  786.     '生成查询结果
  787.     Call Sub_Query
  788.     
  789.     CxbbGrid.Redraw = True
  790.     
  791.     Xt_Wait.Hide
  792. End Sub
  793. Private Sub Sub_Query()                              '生成查询结果(Define)
  794.     
  795.     Dim Rec_Query As Recordset                  '查询结果动态集
  796.     Dim Coljsq As Long                          '网格列计数器
  797.     Dim Jsqte As Long                        '临时动态计数器
  798.     Dim Str As String
  799.     
  800.     
  801.     '以下为自定义部分[
  802.  
  803.     With Tjfx_IncbFxCond
  804.      
  805.         '生成查询条件
  806.         Str_QueryCondi = " where inoutflag=1 and " & .WhCode & " and  kjyear= " & Xtyear
  807.         For Jsqte = 0 To 2
  808.             Select Case Jsqte
  809.                 Case 0  '存货分类(Like)
  810.                     If Trim(.LrText(0).Text) <> "" Then
  811.                         Str_QueryCondi = Str_QueryCondi & " And a.invsortcode like '" & Trim(.LrText(0).Tag) & "%'"
  812.                     End If
  813.                 Case 1  '查询存货范围(起始)
  814.                     If Trim(.LrText(1).Text) <> "" Then
  815.                         Str_QueryCondi = Str_QueryCondi & " And a.mnumber>='" & Trim(.LrText(1).Text) & "'"
  816.                     End If
  817.                 Case 2  '查询存货范围(终止)
  818.                     If Trim(.LrText(2).Text) <> "" Then
  819.                         Str_QueryCondi = Str_QueryCondi & " And a.mnumber<= '" & Trim(.LrText(2).Text) & "'"
  820.                     End If
  821.             End Select
  822.         Next Jsqte
  823.     End With
  824.     
  825.     CxbbGrid.Rows = CxbbGrid.FixedRows
  826.     If Tjfx_IncbFxCond.Com_FxCond.ListIndex = 0 Then
  827.         SqlStr = "SELECT MNumber, MName,Sum(InMoney) as InMoney,Period From Chhs_v_List a" & _
  828.                   Str_QueryCondi & " Group by MNumber,MName,Period " & _
  829.                  " ORDER BY a.MNumber "
  830.         CxbbGrid.TextMatrix(0, Sydz("001", GridStr(), Szzls)) = "存货编码"
  831.         CxbbGrid.TextMatrix(0, Sydz("002", GridStr(), Szzls)) = "存货名称"
  832.     Else
  833.         SqlStr = "SELECT InOutClassCode, InOutClassName,Sum(InMoney) as InMoney,Period From Chhs_v_List a" & _
  834.                   Str_QueryCondi & " Group by InOutClassCode, InOutClassName,Period " & _
  835.                  " ORDER BY a.InOutClassCode "
  836.         CxbbGrid.TextMatrix(0, Sydz("001", GridStr(), Szzls)) = "入库类别编码"
  837.         CxbbGrid.TextMatrix(0, Sydz("002", GridStr(), Szzls)) = "入库类别名称"
  838.     End If
  839.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  840.     With Rec_Query
  841.         
  842.         Do While Not .EOF
  843.             '[>>自定义填充内容
  844.             Str = Trim(.Fields(0) & "")
  845.             If Str = "" Then Str = "1"
  846.             Jsqte = CxbbGrid.FindRow(Str, , 0)
  847.             If Jsqte <= 0 Then
  848.                 CxbbGrid.AddItem ""
  849.                 Jsqte = CxbbGrid.Rows - 1
  850.             End If
  851.             CxbbGrid.TextMatrix(Jsqte, 0) = Str
  852.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields(0) & "")
  853.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields(1) & "")
  854.             If .Fields("period") = 1 Then
  855.                  If .Fields("InMoney") <> 0 Then
  856.                      CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls))) + .Fields("InMoney")
  857.                  End If
  858.             End If
  859.             If .Fields("period") = 2 Then
  860.                  If .Fields("InMoney") <> 0 Then
  861.                      CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls))) + .Fields("InMoney")
  862.                  End If
  863.             End If
  864.             If .Fields("period") = 3 Then
  865.                  If .Fields("InMoney") <> 0 Then
  866.                      CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls))) + .Fields("InMoney")
  867.                  End If
  868.             End If
  869.             If .Fields("period") = 4 Then
  870.                  If .Fields("InMoney") <> 0 Then
  871.                      CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls))) + .Fields("InMoney")
  872.                  End If
  873.             End If
  874.             If .Fields("period") = 5 Then
  875.                  If .Fields("InMoney") <> 0 Then
  876.                      CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls))) + .Fields("InMoney")
  877.                  End If
  878.             End If
  879.             If .Fields("period") = 6 Then
  880.                  If .Fields("InMoney") <> 0 Then
  881.                      CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls))) + .Fields("InMoney")
  882.                  End If
  883.             End If
  884.             If .Fields("period") = 7 Then
  885.                  If .Fields("InMoney") <> 0 Then
  886.                      CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls))) + .Fields("InMoney")
  887.                  End If
  888.             End If
  889.             If .Fields("period") = 8 Then
  890.                  If .Fields("InMoney") <> 0 Then
  891.                      CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls))) + .Fields("InMoney")
  892.                  End If
  893.             End If
  894.             If .Fields("period") = 9 Then
  895.                  If .Fields("InMoney") <> 0 Then
  896.                      CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls))) + .Fields("InMoney")
  897.                  End If
  898.             End If
  899.             If .Fields("period") = 10 Then
  900.                  If .Fields("InMoney") <> 0 Then
  901.                      CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls))) + .Fields("InMoney")
  902.                  End If
  903.             End If
  904.             If .Fields("period") = 11 Then
  905.                  If .Fields("InMoney") <> 0 Then
  906.                      CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls))) + .Fields("InMoney")
  907.                  End If
  908.             End If
  909.             If .Fields("period") = 12 Then
  910.                  If .Fields("InMoney") <> 0 Then
  911.                      CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls))) + .Fields("InMoney")
  912.                  End If
  913.             End If
  914.            
  915.             '<<]
  916.             '设置数据行高度(Fixed)
  917.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  918.             
  919.              .MoveNext
  920.         Loop
  921.     End With
  922.     
  923.     
  924.     '输入合计
  925.     With CxbbGrid
  926.         If .Rows = .FixedRows Then Exit Sub
  927.         '横向合计
  928.         For Jsqte = .FixedRows To .Rows - 1
  929.             For Coljsq = Sydz("003", GridStr(), Szzls) To .Cols - 2
  930.                  .TextMatrix(Jsqte, .Cols - 1) = Val(.TextMatrix(Jsqte, .Cols - 1)) + Val(.TextMatrix(Jsqte, Coljsq))
  931.             Next Coljsq
  932.         Next Jsqte
  933.         
  934.         '纵向合计
  935.         .SubtotalPosition = flexSTBelow
  936.         For Jsqte = Qslz To .Cols - 1
  937.              If GridBoolean(Jsqte, 4) Then
  938.                   .Subtotal flexSTSum, -1, Jsqte, , &HF7F3EC, , , , , True
  939.                   If Val(.TextMatrix(.Rows - 1, Jsqte)) = 0 Then
  940.                       .TextMatrix(.Rows - 1, Jsqte) = ""
  941.                   End If
  942.              End If
  943.         Next
  944.         Jsqte = .Rows - 1
  945.         .RowHeight(Jsqte) = Sjhgd
  946.         .TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = ""
  947.         .TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = "合计 "
  948.     End With
  949.     
  950.     ']以上为用户自定义部分
  951.     
  952.     Set Rec_Query = Nothing
  953. End Sub
  954. Private Sub Sub_QueryFz()    '横向输出入库类别                         '生成查询结果(Define)
  955.     
  956.     Dim Rec_Query As Recordset                  '查询结果动态集
  957.     Dim Coljsq As Long                          '网格列计数器
  958.     Dim Jsqte As Long                        '临时动态计数器
  959.     Dim Str As String
  960.     
  961.     '以下为自定义部分[
  962.     
  963.     CxbbGrid.Rows = CxbbGrid.FixedRows
  964.     SqlStr = "SELECT InoutClassCode,InOutClassName, Sum(InMoney) as InMoney,Period From Chhs_v_List a" & _
  965.                   Str_QueryCondi & " Group by InoutClassCode,InOutClassName,Period " & _
  966.                  " ORDER BY a.InOutClassCode "
  967.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  968.     With Rec_Query
  969.         
  970.         Do While Not .EOF
  971.             '[>>自定义填充内容
  972.             Str = Trim(.Fields("InOutClassName") & "")
  973.             If Str = "" Then Str = "无入库类别"
  974.             
  975.             Jsqte = CxbbGrid.FindRow(.Fields("period"), , Sydz("001", GridStr(), Szzls))
  976.             If Jsqte <= 0 Then
  977.                 CxbbGrid.AddItem ""
  978.                 Jsqte = CxbbGrid.Rows - 1
  979.             End If
  980.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("period") & "")
  981.             For Coljsq = Sydz("003", GridStr(), Szzls) To CxbbGrid.Cols - 1
  982.                 If Str = "无入库类别" Then
  983.                     CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Val(CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls))) + .Fields("InMoney")
  984.                     Exit For
  985.                 End If
  986.                 If Trim(.Fields("InOutClassName") & "") = Trim(CxbbGrid.TextMatrix(0, Coljsq)) Then
  987.                     CxbbGrid.TextMatrix(Jsqte, Coljsq) = Val(CxbbGrid.TextMatrix(Jsqte, Coljsq)) + .Fields("inmoney")
  988.                     Exit For
  989.                 End If
  990.             Next Coljsq
  991.             '<<]
  992.             '设置数据行高度(Fixed)
  993.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  994.             
  995.              .MoveNext
  996.         Loop
  997.     End With
  998.     
  999.     
  1000.     '输入合计
  1001.     With CxbbGrid
  1002.         If .Rows = .FixedRows Then Exit Sub
  1003.         '横向合计
  1004.         For Jsqte = .FixedRows To .Rows - 1
  1005.             For Coljsq = Sydz("003", GridStr(), Szzls) To .Cols - 2
  1006.                  .TextMatrix(Jsqte, .Cols - 1) = Val(.TextMatrix(Jsqte, .Cols - 1)) + Val(.TextMatrix(Jsqte, Coljsq))
  1007.             Next Coljsq
  1008.         Next Jsqte
  1009.         
  1010.         '纵向合计
  1011.         .SubtotalPosition = flexSTBelow
  1012.         For Jsqte = Qslz + 1 To .Cols - 1
  1013.             .Subtotal flexSTSum, -1, Jsqte, , &HF7F3EC, , , , , True
  1014.             If Val(.TextMatrix(.Rows - 1, Jsqte)) = 0 Then
  1015.                 .TextMatrix(.Rows - 1, Jsqte) = ""
  1016.             End If
  1017.         Next
  1018.         Jsqte = .Rows - 1
  1019.         .RowHeight(Jsqte) = Sjhgd
  1020.         .TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = "合计 "
  1021.     End With
  1022.     
  1023.     ']以上为用户自定义部分
  1024.     
  1025.     Set Rec_Query = Nothing
  1026. End Sub
  1027. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1028.     
  1029.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1030.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1031.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1032.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1033.     ReDim Bbxbt(1 To Bbxbtgs)
  1034.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1035.     If Bbbwhgs <> 0 Then
  1036.         ReDim Bbbwh(1 To Bbbwhgs)
  1037.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1038.     End If
  1039.     Bbzbt = Lab_Title(0)
  1040.     Bbxbt(1) = ""
  1041.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1042.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1043.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1044.     If Not bbylte Then
  1045.         Unload DY_Tybbyldy
  1046.     End If
  1047. End Sub