📄 frmtest.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Begin VB.Form frmTest
Caption = "Form1"
ClientHeight = 6540
ClientLeft = 60
ClientTop = 345
ClientWidth = 8730
LinkTopic = "Form1"
ScaleHeight = 6540
ScaleWidth = 8730
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "report 1"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 5
Top = 5400
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "close"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6840
TabIndex = 4
Top = 5400
Width = 1455
End
Begin VB.CommandButton Command3
Caption = "report 2"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
TabIndex = 3
Top = 5400
Width = 1455
End
Begin VB.CommandButton Command4
Caption = "print"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 2
Top = 5400
Width = 1455
End
Begin VB.CommandButton Command5
Caption = "report 3"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5280
TabIndex = 1
Top = 5400
Width = 1455
End
Begin MSDataGridLib.DataGrid grdTest
Bindings = "frmTest.frx":0000
Height = 4815
Left = 240
TabIndex = 0
Top = 240
Width = 8295
_ExtentX = 14631
_ExtentY = 8493
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 600
Top = 6000
Width = 1215
_ExtentX = 2143
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=NWIND.MDB;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=NWIND.MDB;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "Customers"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "frmTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Dim prtTest As New clsPrintGrid1
Dim bp As New BrookPrint.PrintQueryEx
Dim bp1 As New BrookPrint.PrintQuery
Private Sub Command1_Click()
bp.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=NWIND.MDB;Persist Security Info=False"
bp.RecordSource = "Select OrderId As 定单号, ProductId As 产品, UnitPrice As 单价, Quantity As 质检号, Discount As '打折率(%)' From [Order Details] "
bp.ReportName = "双层表头测试报表"
bp.AppPath = App.Path
bp.ReportRemark = "1babasdfasdfASDFADF"
bp.ReportRemark = "2fASDFADF"
bp.ReportRemark = "3babasdf"
bp.ReportRemark = "4wgwgwergre"
bp.ReportID = "Query001"
bp.Show
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
' Adodc1.Recordset.MoveLast
' MsgBox CStr(Adodc1.Recordset.EOF)
' MsgBox CStr(Adodc1.Recordset.AbsolutePosition)
' Adodc1.Recordset.MoveNext
' MsgBox CStr(Adodc1.Recordset.EOF)
' MsgBox CStr(Adodc1.Recordset.AbsolutePosition)
' prtTest.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\MyPrj\printtest\NWIND.MDB;Persist Security Info=False"
' prtTest.RecordSource = "Select CustomerID As 编号, CompanyName As 公司, ContactName As 联系人, City As 城市, Region As 地区, Country As 国家 From Customers"
' prtTest.ReportName = "双层表头测试报表2"
' prtTest.AppPath = App.Path
' prtTest.ShowGrid
End Sub
Private Sub Command4_Click()
bp1.GridColumns = grdTest.Columns
bp1.ReportData = Adodc1.Recordset
bp1.ReportName = "查询结果集报表"
bp1.ReportRemark = "1asdfasdf"
bp1.ReportRemark = "2asdfasdf"
bp1.ReportRemark = "3asdfasdf"
bp1.ReportRemark = "4asdfasdf"
bp1.AppPath = App.Path
bp1.Show
End Sub
Private Sub Command5_Click()
' prtTest.ConnectionString = "DSN=xmk"
' prtTest.RecordSource = "select xmb.xmbh 项目编号,xmb.xmmc 项目名称,xmb.cglx 采购方式,xmszb.cbbm 委托人,round(xmb.czly+xmb.czyswzj+xmb.zczj+xmb.scj,2) [项目总资金(万元)],round(xmb.czly,2) '预算内资金(万元)',round(xmb.czyswzj,2) '预算外资金(万元)'" _
' & ",round(xmb.zczj,2) '自有资金(万元)',round(xmb.scj,2) '其他资金(万元)',round(xmszb.qdhtje,2) '合同总金额(万元)',round(sum(xmfbb.czysnzj),2) '预算内支付(万元)',round(sum(xmfbb.czyswzj),2) '预算外支付(万元)',round(sum(xmfbb.zyzj),2) '自有资金支付(万元)'" _
' & ",round(sum(xmfbb.qtzj),2) '其他资金支付(万元)',convert(varchar,round((1-xmszb.qdhtje/(xmb.czly+xmb.czyswzj+xmb.zczj+xmb.scj))*100,2)) '综合节约率(%)',xmcgsjb.cbry 承办人员,xmb.lxrq 立项时间,xmcgsjb.fbsj 发标时间,xmcgsjb.kbsj 开标时间,xmb.qdhtsj 签合同时间" _
' & ",xmcgsjb.fbzs 分包组数,xmcgsjb.yqgyss 邀请供应商数,xmcgsjb.pwrs 评委人数,round(xmszb.tbbzj,2) '投保金(万元)',round(xmszb.yjlybzj,2) '履约金(万元)',round(xmcgsjb.bsdj,2) '标书单价(元)',round(xmszb.bssr,2) '标书收入(元)',round(xmszb.fwf,2) '服务费(元)'" _
' & ",round(xmszb.lcxmpcj,2) '赔偿金(元)',round(xmszb.pbf,2) '评标费(元)',round(xmszb.yjlybzj-xmszb.ytlybzj,2) '履约金余额(万元)'From xmfbb, xmcgsjb, xmszb, xmb where xmfbb.xmbh=xmb.xmbh and xmszb.xmbh=xmb.xmbh and xmcgsjb.xmbh=xmb.xmbh and xmb.sfwc='1'" _
' & " group by xmb.xmbh,xmb.xmmc,xmb.cglx,xmszb.cbbm,xmb.czly,xmb.czyswzj,xmb.zczj,xmb.scj,xmszb.qdhtje,xmcgsjb.cbry,xmb.lxrq,xmcgsjb.fbsj,xmcgsjb.kbsj,xmb.qdhtsj,xmcgsjb.fbzs,xmcgsjb.yqgyss,xmcgsjb.pwrs,xmszb.tbbzj,xmszb.yjlybzj,xmcgsjb.bsdj,xmszb.bssr,xmszb.fwf,xmszb.lcxmpcj,xmszb.pbf,xmszb.ytlybzj"
' prtTest.UserName = "sa"
' prtTest.PassWord = ""
' prtTest.ReportName = "项目综合信息报表"
' prtTest.AppPath = App.Path
' prtTest.ShowGrid
End Sub
Private Sub Form_Load()
' Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -