资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:26k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{7E00A3A2-8F5C-11D2-BAA4-04F205C10000}#1.0#0"; "VsVIEW6.ocx"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form DY_Dyymsz
- BorderStyle = 3 'Fixed Dialog
- Caption = "打印页面设置"
- ClientHeight = 5190
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 6030
- ControlBox = 0 'False
- HelpContextID = 1601002
- Icon = "系统_打印页面设置.frx":0000
- LinkTopic = "Form3"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5190
- ScaleWidth = 6030
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton BcCommand
- Caption = "保存设置(&S)"
- Height = 300
- Left = 3540
- TabIndex = 41
- Top = 4410
- Width = 1120
- End
- Begin VB.VScrollBar BxjgVScroll
- Height = 285
- Left = 5610
- Max = 1
- Min = 32767
- TabIndex = 40
- Top = 3480
- Value = 32767
- Width = 255
- End
- Begin VB.TextBox BbsclText
- Height = 315
- Left = 6300
- TabIndex = 37
- Top = 2880
- Width = 915
- End
- Begin VB.VScrollBar BjjgVScroll
- Height = 255
- Left = 5610
- TabIndex = 35
- Top = 3030
- Width = 255
- End
- Begin VB.Frame Frame1
- Caption = "基本设置项目"
- Height = 1035
- Left = 1290
- TabIndex = 30
- Top = 150
- Width = 2895
- Begin VB.Label Label7
- Caption = "包括:打印纸张大小,纸张来源,打印方向 打印上下边界,左右边界及打印机属性"
- Height = 735
- Left = 90
- TabIndex = 31
- Top = 240
- Width = 2745
- End
- End
- Begin VB.CommandButton bzCommand
- Caption = "帮助(&H)"
- Height = 300
- Left = 4740
- TabIndex = 29
- Top = 4410
- Width = 1120
- End
- Begin VSVIEW6Ctl.VSPrinter YmszPrinter
- Height = 615
- Left = 6300
- TabIndex = 26
- Top = 3780
- Visible = 0 'False
- Width = 495
- _cx = 4195177
- _cy = 4195389
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- MousePointer = 0
- BackColor = -2147483643
- Font = "系统_打印页面设置.frx":1042
- HdrFont = "系统_打印页面设置.frx":1066
- AutoRTF = -1 'True
- Preview = -1 'True
- DefaultDevice = 0 'False
- PhysicalPage = -1 'True
- AbortWindow = -1 'True
- AbortWindowPos = 0
- AbortCaption = "Printing..."
- AbortTextButton = "Cancel"
- AbortTextDevice = "on the %s on %s"
- AbortTextPage = "Now printing Page %d of"
- FileName = ""
- MarginLeft = 1440
- MarginTop = 1440
- MarginRight = 1440
- MarginBottom = 1440
- MarginHeader = 0
- MarginFooter = 0
- IndentLeft = 0
- IndentRight = 0
- IndentFirst = 0
- IndentTab = 720
- SpaceBefore = 0
- SpaceAfter = 0
- LineSpacing = 100
- Columns = 1
- ColumnSpacing = 180
- ShowGuides = 2
- LargeChangeHorz = 300
- LargeChangeVert = 300
- SmallChangeHorz = 30
- SmallChangeVert = 30
- Track = 0 'False
- ProportionalBars= -1 'True
- Zoom = -.377833753148615
- ZoomMode = 3
- ZoomMax = 400
- ZoomMin = 10
- ZoomStep = 5
- MouseZoom = 2
- MouseScroll = -1 'True
- MousePage = -1 'True
- EmptyColor = -2147483636
- TextColor = 0
- HdrColor = 0
- BrushColor = 0
- BrushStyle = 0
- PenColor = 0
- PenStyle = 0
- PenWidth = 0
- PageBorder = 0
- Header = ""
- Footer = ""
- TableSep = "|;"
- TableBorder = 7
- TablePen = 0
- TablePenLR = 0
- TablePenTB = 0
- HTMLStyle = 1
- End
- Begin MSComDlg.CommonDialog YmszDialog
- Left = 6300
- Top = 3240
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin VB.CommandButton JbszCommand
- Caption = "基本设置"
- Height = 975
- Left = 150
- Picture = "系统_打印页面设置.frx":1090
- Style = 1 'Graphical
- TabIndex = 18
- Top = 210
- Width = 1035
- End
- Begin VB.CommandButton QxCommand
- Caption = "取消(&C)"
- Height = 300
- Left = 4740
- TabIndex = 17
- Top = 4800
- Width = 1120
- End
- Begin VB.Frame Frame3
- Caption = "报表字体/行数"
- Height = 1515
- Left = 120
- TabIndex = 9
- Top = 1320
- Width = 5775
- Begin VB.CommandButton Bbztcommand
- Caption = "表体设置(&B)"
- Height = 300
- Left = 4500
- TabIndex = 21
- Top = 690
- Width = 1120
- End
- Begin VB.CommandButton Btztcommand
- Caption = "标题设置(&T)"
- Height = 300
- Left = 4500
- TabIndex = 20
- Top = 270
- Width = 1120
- End
- Begin VB.VScrollBar BbhsVScroll
- Height = 285
- Left = 2280
- TabIndex = 16
- Top = 1110
- Width = 285
- End
- Begin VB.TextBox BbhsText
- Height = 300
- Left = 1290
- MaxLength = 4
- TabIndex = 15
- Top = 1110
- Width = 1305
- End
- Begin VB.Label Sjzhlabel
- BackColor = &H80000009&
- BorderStyle = 1 'Fixed Single
- Height = 300
- Left = 3660
- TabIndex = 25
- Top = 690
- Width = 765
- End
- Begin VB.Label SjztLabel
- BackColor = &H80000009&
- BorderStyle = 1 'Fixed Single
- Height = 300
- Left = 930
- TabIndex = 24
- Top = 690
- Width = 1665
- End
- Begin VB.Label Btzhlabel
- BackColor = &H80000009&
- BorderStyle = 1 'Fixed Single
- Height = 300
- Left = 3660
- TabIndex = 23
- Top = 270
- Width = 765
- End
- Begin VB.Label Btztlabel
- BackColor = &H80000009&
- BorderStyle = 1 'Fixed Single
- Height = 300
- Left = 930
- TabIndex = 22
- Top = 270
- Width = 1665
- End
- Begin VB.Label Label6
- Caption = "(指定行数大于满页行数以满页计)"
- Height = 195
- Left = 2820
- TabIndex = 19
- Top = 1170
- Width = 2715
- End
- Begin VB.Label Label5
- Caption = "每页报表行数:"
- Height = 225
- Left = 120
- TabIndex = 14
- Top = 1140
- Width = 1185
- End
- Begin VB.Label Label4
- Caption = "表体字号:"
- Height = 255
- Left = 2850
- TabIndex = 13
- Top = 720
- Width = 855
- End
- Begin VB.Label Label3
- Caption = "表体字体:"
- Height = 225
- Left = 120
- TabIndex = 12
- Top = 720
- Width = 825
- End
- Begin VB.Label Label2
- Caption = "标题字号:"
- Height = 285
- Left = 2850
- TabIndex = 11
- Top = 300
- Width = 825
- End
- Begin VB.Label Label1
- Caption = "标题字体:"
- Height = 255
- Left = 120
- TabIndex = 10
- Top = 330
- Width = 825
- End
- End
- Begin VB.CommandButton QdCommand
- Caption = "确定(&O)"
- Height = 300
- Left = 3540
- TabIndex = 2
- Top = 4800
- Width = 1120
- End
- Begin VB.Frame Frame2
- Caption = "输出方式"
- Height = 2205
- Left = 150
- TabIndex = 1
- Top = 2910
- Width = 2775
- Begin VB.CheckBox TdfsCheck
- Caption = "套打方式输出(&D)"
- Height = 285
- Left = 180
- TabIndex = 42
- Top = 1860
- Width = 1995
- End
- Begin VB.CheckBox GdscCheck
- Caption = "报表分页是否重复输出固定列"
- Height = 690
- Left = 2070
- TabIndex = 32
- Top = 1920
- Visible = 0 'False
- Width = 1755
- End
- Begin VB.CheckBox LxscCheck
- Caption = "报表打印未满页连续打印(&L)"
- Height = 420
- Left = 180
- TabIndex = 28
- Top = 1440
- Width = 2565
- End
- Begin VB.CheckBox KbscCheck
- Caption = "无记录输出空表(&K)"
- Height = 345
- Left = 180
- TabIndex = 27
- Top = 810
- Width = 2205
- End
- Begin VB.CheckBox ZdhsCheck
- Caption = "指定每页报表行数(&Z)"
- Height = 285
- Left = 180
- TabIndex = 8
- Top = 525
- Width = 2055
- End
- Begin VB.CheckBox BjdcCheck
- Caption = "对称页边距(&I)"
- Height = 285
- Left = 180
- TabIndex = 7
- Top = 1155
- Width = 1965
- End
- Begin VB.CheckBox MydyCheck
- Caption = "报表满页打印(&M)"
- Height = 285
- Left = 180
- TabIndex = 6
- Top = 240
- Width = 1935
- End
- End
- Begin VB.Frame Zdwzframe
- Caption = "装订位置"
- Height = 1035
- Left = 4290
- TabIndex = 0
- Top = 150
- Width = 1605
- Begin VB.OptionButton Zdoption
- Caption = "页 面 左 端"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 5
- Top = 750
- Width = 1455
- End
- Begin VB.OptionButton Zdoption
- Caption = "页 面 上 端"
- Height = 345
- Index = 1
- Left = 120
- TabIndex = 4
- Top = 450
- Width = 1425
- End
- Begin VB.OptionButton Zdoption
- Caption = "无 装 订 线"
- Height = 345
- Index = 0
- Left = 120
- TabIndex = 3
- Top = 180
- Width = 1365
- End
- End
- Begin VB.Label BxjgLabel
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Height = 315
- Left = 4740
- TabIndex = 39
- Top = 3450
- Width = 1155
- End
- Begin VB.Label Label9
- BackStyle = 0 'Transparent
- Caption = "表格线输出间隔行数"
- Height = 345
- Left = 3090
- TabIndex = 38
- Top = 3510
- Width = 1635
- End
- Begin VB.Label Bjjglabel
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Height = 315
- Left = 4740
- TabIndex = 36
- Top = 3000
- Width = 1155
- End
- Begin VB.Label Label8
- BackStyle = 0 'Transparent
- Caption = "连续输出表表间间隔"
- Height = 225
- Left = 3090
- TabIndex = 34
- Top = 3060
- Width = 1665
- End
- Begin VB.Label BbmcLabel
- Height = 255
- Left = 6330
- TabIndex = 33
- Top = 2580
- Visible = 0 'False
- Width = 795
- End
- End
- Attribute VB_Name = "DY_Dyymsz"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*******************************************************
- '* 模 块 名 称 :打印页面设置
- '* 功 能 描 述 :可以设置报表打印属性,并可保存设置
- '*
- '* 参数:系统打印报表编码
- '*
- '* 程序员姓名 :张建忠
- '* 最后修改人 :张建忠
- '* 最后修改时间:2001/06/21
- '* 备 注:封版
- '*******************************************************
- Dim Dybbcsrec As New ADODB.Recordset
- Dim Changelock As Boolean
- Dim Hfbbbtfont$, Hfbbbtsize$, Hfbbsjqfont$, Hfbbsjqsize$
- Dim Hfzdmybbhs%, Hfsfzdbbhs%, Hfzdxwz%
- Dim Hfsfmydy As Boolean, Hfsfdcybj As Boolean, Hfsfsckb As Boolean, Hfzdbbhs As Boolean
- Dim Hfsflxdy As Boolean, Hfsftdfssc As Boolean
- Dim Hfbjjg As Integer, Hfbxjg As Integer
- Dim BcMarginleft As Double, BcMarginright As Double, BcMargintop As Double, BcMarginbottom As Double
- Dim Tsxx As String
- Dim XtReportCodete As String
- Private Sub BbhsText_KeyPress(KeyAscii As Integer)
- If Not ((Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Or KeyAscii = vbKeyBack) Then
- KeyAscii = 0
- End If
- End Sub
- Private Sub Bbztcommand_Click() '设 置 标 题 字 体
- With YmszDialog
- .Flags = cdlCFBoth
- .FontName = SjztLabel
- .FontSize = Sjzhlabel
- .ShowFont
- SjztLabel = .FontName
- Sjzhlabel = .FontSize
- End With
- End Sub
- Private Sub BcCommand_Click() '保 存 用 户 打 印 设 置
- If Dybbcsrec.State = 1 Then Dybbcsrec.Close
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- Dybbcsrec.Open "select * from xt_dybbcs where bbbm='" + XtReportCodete + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- With Dybbcsrec
- If Not (.EOF And .BOF) Then
- '标题及数据区字体
- .Fields("bbbtfont") = Trim(Btztlabel)
- .Fields("bbbtsize") = Trim(Btzhlabel)
- .Fields("bbsjqfont") = Trim(SjztLabel)
- .Fields("bbsjqsize") = Trim(Sjzhlabel)
- '指定每页报表数据行数
- .Fields("zdmybbhs") = BbhsVScroll.Value
- '装订线位置
- For jsqte = 0 To 2
- If Zdoption(jsqte).Value Then
- .Fields("zdxwz") = jsqte
- End If
- Next jsqte
- '输出方式
- .Fields("sfmydy") = MydyCheck.Value
- .Fields("sfdcybj") = BjdcCheck.Value
- .Fields("sfsckb") = KbscCheck.Value
- .Fields("sfzdbbhs") = ZdhsCheck.Value
- .Fields("sfgdsc") = GdscCheck.Value
- .Fields("sflxdy") = LxscCheck.Value
- .Fields("sftdfssc") = TdfsCheck.Value
- '连续输出表表间间隔
- .Fields("bjjg") = BjjgVScroll.Value
- '报表数据区表格线打印间隔行数
- .Fields("bbbxjg") = BxjgVScroll.Value
- '打印机设置
- .Fields("papersize") = YmszPrinter.PaperSize
- If YmszPrinter.PaperSize = 256 Then
- .Fields("PaperWidth") = YmszPrinter.PaperWidth
- .Fields("PaperHeight") = YmszPrinter.PaperHeight
- End If
- .Fields("paperscfx") = YmszPrinter.Orientation
- .Fields("bbzbj") = BcMarginleft
- .Fields("bbybj") = BcMarginright
- .Fields("bbsbj") = BcMargintop
- .Fields("bbxbj") = BcMarginbottom
- .Update
- End If
- End With
- Cw_DataEnvi.DataConnect.CommitTrans
- Tsxx = "打印设置信息保存完毕!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Sub
- Swcwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Tsxx = "存盘过程中出现未知错误,程序自动恢复保存前状态!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Sub
- End Sub
- Private Sub BjjgVScroll_Change() '设置表间间隔
- Bjjglabel = BjjgVScroll.Value
- End Sub
- Private Sub BtztCommand_Click() '设置报表数据区字体
- With YmszDialog
- .Flags = cdlCFBoth
- .FontName = Btztlabel
- .FontSize = Btzhlabel
- .ShowFont
- Btztlabel = .FontName
- Btzhlabel = .FontSize
- End With
- End Sub
- Private Sub BxjgVScroll_Change()
- BxjgLabel = BxjgVScroll.Value
- End Sub
- Private Sub bzCommand_Click()
- Call F1bz
- End Sub
- Private Sub Form_Activate() '保存现有设置值以便恢复
- '标题及数据区字体
- Hfbbbtfont = Btztlabel
- Hfbbbtsize = Btzhlabel
- Hfbbsjqfont = SjztLabel
- Hfbbsjqsize = Sjzhlabel
- '指定每页报表数据行数
- Hfzdmybbhs = BbhsVScroll.Value
- Hfsfzdbbhs = ZdhsCheck.Value
- '装订线位置
- For jsqte = 0 To 2
- If Zdoption(jsqte).Value Then
- Hfzdxwz = jsqte
- End If
- Next jsqte
- '输出方式
- If MydyCheck.Value = 1 Then
- Hfsfmydy = True
- Else
- Hfsfmydy = False
- End If
- If BjdcCheck.Value = 1 Then
- Hfsfdcybj = True
- Else
- Hfsfdcybj = False
- End If
- If KbscCheck.Value = 1 Then
- Hfsfsckb = True
- Else
- Hfsfsckb = False
- End If
- If ZdhsCheck.Value = 1 Then
- Hfzdbbhs = True
- Else
- Hfzdbbhs = False
- End If
- If LxscCheck.Value = 1 Then
- Hfsflxdy = True
- Else
- Hfsflxdy = False
- End If
- If TdfsCheck.Value = 1 Then
- Hfsftdfssc = True
- Else
- Hfsftdfssc = False
- End If
- '表间间隔
- Hfbjjg = BjjgVScroll.Value
- '表线间隔
- Hfbxjg = BxjgLabel
- '报表左、右、上、下边界
- BcMarginleft = YmszPrinter.MarginLeft
- BcMarginright = YmszPrinter.MarginRight
- BcMargintop = YmszPrinter.MarginTop
- BcMarginbottom = YmszPrinter.MarginBottom
- End Sub
- Private Sub Form_Load()
- '读入系统打印报表编码
- XtReportCodete = XtReportCode
- Call Cshz
- End Sub
- Private Sub Cshz()
- Set Dybbcsrec = Cw_DataEnvi.DataConnect.Execute("select * from xt_dybbcs where bbbm='" + XtReportCode + "'")
- With Dybbcsrec
- If Not (.EOF And .BOF) Then
- '报表名称
- BbmcLabel = Trim(.Fields("bbmc"))
- '报表固定输出终止列
- BbsclText.Text = .Fields("gdsczzl")
- '标题及数据区字体
- Btztlabel = Trim(.Fields("bbbtfont"))
- Btzhlabel = Trim(.Fields("bbbtsize"))
- SjztLabel = Trim(.Fields("bbsjqfont"))
- Sjzhlabel = Trim(.Fields("bbsjqsize"))
- '指定每页报表数据行数
- Changelock = True
- BbhsVScroll.Max = 1
- BbhsVScroll.Min = 32000
- Changelock = False
- BbhsVScroll.Value = .Fields("zdmybbhs")
- '装订线位置
- Zdoption(.Fields("zdxwz")).Value = True
- '输出方式
- If .Fields("sfmydy") Then
- MydyCheck.Value = 1
- Else
- MydyCheck.Value = 0
- End If
- If .Fields("sfdcybj") Then
- BjdcCheck.Value = 1
- Else
- BjdcCheck.Value = 0
- End If
- If .Fields("sfsckb") Then
- KbscCheck.Value = 1
- Else
- KbscCheck.Value = 0
- End If
- If .Fields("sfzdbbhs") Then
- ZdhsCheck.Value = 1
- Else
- ZdhsCheck.Value = 0
- End If
- If .Fields("sfgdsc") Then
- GdscCheck.Value = 1
- Else
- GdscCheck.Value = 0
- End If
- If .Fields("sflxdy") Then
- LxscCheck.Value = 1
- Else
- LxscCheck.Value = 0
- End If
- If .Fields("sftdfssc") Then
- TdfsCheck.Value = 1
- Else
- TdfsCheck.Value = 0
- End If
- '连续输出表表间间隔
- BjjgVScroll.Max = 1
- BjjgVScroll.Min = 50
- BjjgVScroll.Value = .Fields("bjjg")
- '报表数据区表格线打印间隔行数
- BxjgVScroll.Value = .Fields("bbbxjg")
- '打印机设置
- YmszPrinter.PaperSize = .Fields("papersize")
- If .Fields("papersize") = 256 And .Fields("PaperWidth") <> 0 And .Fields("PaperHeight") <> 0 Then
- YmszPrinter.PaperWidth = .Fields("PaperWidth")
- YmszPrinter.PaperHeight = .Fields("PaperHeight")
- End If
- YmszPrinter.Orientation = .Fields("paperscfx")
- YmszPrinter.MarginLeft = .Fields("bbzbj")
- YmszPrinter.MarginRight = .Fields("bbybj")
- YmszPrinter.MarginTop = .Fields("bbsbj")
- YmszPrinter.MarginBottom = .Fields("bbxbj")
- End If
- End With
- End Sub
- Private Sub BbhsVScroll_Change() '指定行数滚动条改变
- If Changelock Then
- Exit Sub
- End If
- Changelock = True
- BbhsText.Text = Trim(Str(BbhsVScroll.Value))
- Changelock = False
- End Sub
- Private Sub BbhsText_change() '指定行数文本框改变
- If Changelock Then
- Exit Sub
- End If
- If Val(BbhsText) <= BbhsVScroll.Min And Val(BbhsText) >= BbhsVScroll.Max Then
- Changelock = True
- BbhsVScroll.Value = Val(BbhsText)
- Changelock = False
- Else
- Changelock = True
- BbhsVScroll.Value = 1
- BbhsText.Text = 1
- Changelock = False
- End If
- End Sub
- Private Sub JbszCommand_Click() '基 本 设 置
- If YmszPrinter.NDevices <= 0 Then
- Tsxx = "本机未安装任何打印机!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- End If
- YmszPrinter.MarginLeft = BcMarginleft
- YmszPrinter.MarginRight = BcMarginright
- YmszPrinter.MarginTop = BcMargintop
- YmszPrinter.MarginBottom = BcMarginbottom
- With YmszPrinter
- .PrintDialog (pdPageSetup)
- End With
- BcMarginleft = YmszPrinter.MarginLeft
- BcMarginright = YmszPrinter.MarginRight
- BcMargintop = YmszPrinter.MarginTop
- BcMarginbottom = YmszPrinter.MarginBottom
- End Sub
- Private Sub QdCommand_Click() '确 定
- Me.Hide
- End Sub
- Private Sub QxCommand_Click() '取 消
- '标题及数据区字体
- Btztlabel = Hfbbbtfont
- Btzhlabel = Hfbbbtsize
- SjztLabel = Hfbbsjqfont
- Sjzhlabel = Hfbbsjqsize
- '指定每页报表数据行数
- BbhsVScroll.Value = Hfzdmybbhs
- ZdhsCheck.Value = Hfsfzdbbhs
- '装订线位置
- Zdoption(Hfzdxwz).Value = True
- '输出方式
- If Hfsfmydy Then
- MydyCheck.Value = 1
- Else
- MydyCheck.Value = 0
- End If
- If Hfsfdcybj Then
- BjdcCheck.Value = 1
- Else
- BjdcCheck.Value = 0
- End If
- If Hfsfsckb Then
- KbscCheck.Value = 1
- Else
- KbscCheck.Value = 0
- End If
- If Hfzdbbhs Then
- ZdhsCheck.Value = 1
- Else
- ZdhsCheck.Value = 0
- End If
- If Hfsflxdy Then
- LxscCheck.Value = 1
- Else
- LxscCheck.Value = 0
- End If
- If Hfsftdfssc Then
- TdfsCheck.Value = 1
- Else
- TdfsCheck.Value = 0
- End If
- BjjgVScroll.Value = Hfbjjg
- BxjgVScroll.Value = Hfbxjg
- Me.Hide
- End Sub