📄 xsreport.dsr
字号:
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
ItemType3 = 4
BeginProperty Item3 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtCount"
Object.Left = 6236
Object.Width = 1134
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
ItemType4 = 4
BeginProperty Item4 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtCustomer"
Object.Left = 60
Object.Width = 1080
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
ItemType5 = 4
BeginProperty Item5 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtDate"
Object.Left = 8504
Object.Width = 1134
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
ItemType6 = 4
BeginProperty Item6 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtPrice"
Object.Left = 7370
Object.Width = 1134
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
ItemType7 = 4
BeginProperty Item7 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtSpec"
Object.Left = 3969
Object.Width = 1133
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
EndProperty
SectionCode3 = 7
BeginProperty Section3 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Section3"
Object.Height = 240
NumControls = 2
ItemType0 = 3
BeginProperty Item0 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Label10"
Object.Left = 60
Object.Width = 2295
Object.Height = 240
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = 16711680
Object.Caption = "%D"
EndProperty
ItemType1 = 3
BeginProperty Item1 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Label11"
Object.Left = 8172
Object.Width = 1440
Object.Height = 240
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = 16711680
Object.Caption = "%P"
EndProperty
EndProperty
SectionCode4 = 8
BeginProperty Section4 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Section5"
Object.Height = 957
NumControls = 3
ItemType0 = 5
BeginProperty Item0 {1C13A8E3-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Line2"
Object.Width = 9600
Object.Height = 2
EndProperty
ItemType1 = 3
BeginProperty Item1 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Label12"
Object.Left = 60
Object.Top = 90
Object.Width = 990
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Object.Caption = "价格合计:"
EndProperty
ItemType2 = 3
BeginProperty Item2 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "lblTotal"
Object.Left = 990
Object.Top = 90
Object.Width = 1701
Object.Height = 300
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EndProperty
EndProperty
End
Attribute VB_Name = "XSreport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub ShowMe(Rst As ADODB.Recordset)
On Error Resume Next
Set XSreport.DataSource = Rst.DataSource
XSreport.Sections("Section1").Controls("txtCustomer").DataMember = ""
XSreport.Sections("Section1").Controls("txtCustomer").DataField = Rst.Fields("客户名称").Name
XSreport.Sections("Section1").Controls("txtName").DataMember = ""
XSreport.Sections("Section1").Controls("txtName").DataField = Rst.Fields("药品名称").Name
XSreport.Sections("Section1").Controls("txtCount").DataMember = ""
XSreport.Sections("Section1").Controls("txtCount").DataField = Rst.Fields("数量").Name
XSreport.Sections("Section1").Controls("txtPrice").DataMember = ""
XSreport.Sections("Section1").Controls("txtPrice").DataField = Rst.Fields("单价").Name
XSreport.Sections("Section1").Controls("txtChandi").DataMember = ""
XSreport.Sections("Section1").Controls("txtChandi").DataField = Rst.Fields("产地").Name
XSreport.Sections("Section1").Controls("txtDate").DataMember = ""
XSreport.Sections("Section1").Controls("txtDate").DataField = Rst.Fields("日期").Name
XSreport.Sections("Section1").Controls("txtSimpleName").DataMember = ""
XSreport.Sections("Section1").Controls("txtSimpleName").DataField = Rst.Fields("简称").Name
XSreport.Sections("Section1").Controls("txtSpec").DataMember = ""
XSreport.Sections("Section1").Controls("txtSpec").DataField = Rst.Fields("规格").Name
Dim sngTotal As Single
If Rst.EOF = False Then Rst.MoveFirst
Do While Not Rst.EOF
sngTotal = sngTotal + Rst!数量 * Rst!单价
Rst.MoveNext
Loop
XSreport.Sections("Section5").Controls("lblTotal").Caption = FormatNumber(sngTotal, 2, vbTrue) & "元"
Rst.MoveFirst
Me.Show vbModal
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -