📄 kcreport.dsr
字号:
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
ItemType3 = 4
BeginProperty Item3 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "txtCount"
Object.Left = 4536
Object.Width = 1140
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 = "txtSpec"
Object.Left = 5669
Object.Width = 1140
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 = "txtAvgPrice"
Object.Left = 6803
Object.Width = 1140
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 = 8504
Object.Width = 1140
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 = "Label9"
Object.Left = 144
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 = 809
NumControls = 3
ItemType0 = 3
BeginProperty Item0 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Label10"
Object.Left = 60
Object.Top = 60
Object.Width = 1134
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
ItemType1 = 3
BeginProperty Item1 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "lblTotal"
Object.Left = 1134
Object.Top = 60
Object.Width = 1695
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
ItemType2 = 5
BeginProperty Item2 {1C13A8E3-A0B6-11D0-848E-00A0C90DC8A9}
_Version = 393216
Name = "Line2"
Object.Width = 9100
Object.Height = 2
EndProperty
EndProperty
End
Attribute VB_Name = "KCreport"
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 KCreport.DataSource = Rst.DataSource
KCreport.Sections("Section1").Controls("txtName").DataMember = ""
KCreport.Sections("Section1").Controls("txtName").DataField = Rst.Fields("药品名称").Name
KCreport.Sections("Section1").Controls("txtSimpleName").DataMember = ""
KCreport.Sections("Section1").Controls("txtSimpleName").DataField = Rst.Fields("简称").Name
KCreport.Sections("Section1").Controls("txtChandi").DataMember = ""
KCreport.Sections("Section1").Controls("txtChandi").DataField = Rst.Fields("产地").Name
KCreport.Sections("Section1").Controls("txtCount").DataMember = ""
KCreport.Sections("Section1").Controls("txtCount").DataField = Rst.Fields("库存数量").Name
KCreport.Sections("Section1").Controls("txtSpec").DataMember = ""
KCreport.Sections("Section1").Controls("txtSpec").DataField = Rst.Fields("规格").Name
KCreport.Sections("Section1").Controls("txtAvgPrice").DataMember = ""
KCreport.Sections("Section1").Controls("txtAvgPrice").DataField = Rst.Fields("平均进价").Name
KCreport.Sections("Section1").Controls("txtPrice").DataMember = ""
KCreport.Sections("Section1").Controls("txtPrice").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
KCreport.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 + -