📄 bp1print_print.frm
字号:
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "年级:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 735
Left = 1440
TabIndex = 5
Top = 360
Width = 3255
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "学生数:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 360
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "班级数:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 360
TabIndex = 3
Top = 1920
Width = 975
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "年 级:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 360
TabIndex = 2
Top = 360
Width = 975
End
End
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 4695
Left = 0
Picture = "bp1print_print.frx":08CA
ScaleHeight = 4635
ScaleWidth = 1635
TabIndex = 0
TabStop = 0 'False
Top = 0
Width = 1695
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1245
Width = 1095
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 1200
Width = 1335
End
Begin VB.Image Image1
Height = 720
Left = 120
Picture = "bp1print_print.frx":3A92E
Stretch = -1 'True
Top = 0
Width = 720
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "打印报表"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 0
Left = 150
TabIndex = 21
Top = 735
Width = 1335
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "打印报表"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 1
Left = 120
TabIndex = 22
Top = 720
Width = 1335
End
End
End
Attribute VB_Name = "bp1print_print"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yy As Integer
Public jj As Integer
Public classcount As Integer
Public studentcount As Integer
Public nn As String
Public oo As String
Private Sub Command1_Click()
If Option1.Value = True Then
oo = " order by [xh]"
End If
If Option2.Value = True Then
oo = " order by [nn]"
End If
If Option3.Value = True Then
oo = " order by [cl],[xh]"
End If
If Option4.Value = True Then
oo = " order by [whk] DESC"
End If
If Option5.Value = True Then
oo = " order by [x1] DESC"
End If
If Option6.Value = True Then
oo = " order by [x2] DESC"
End If
If Option7.Value = True Then
oo = " order by [x3] DESC"
End If
If Option8.Value = True Then
oo = " order by [x4] DESC"
End If
If Option9.Value = True Then
oo = " order by [zf] DESC"
End If
Dim kk As New ADODB.Recordset
kk.Open "select * from [temp] order by [zf] DESC", main.connect, 3, 2
For i = 1 To kk.RecordCount
kk.Fields("mc") = i
kk.Update
kk.MoveNext
Next
kk.Close
kk.Open "select * from [temp] " & oo, main.connect, 3, 2
Dim kk1 As New ADODB.Recordset
kk1.Open "select * from [nn]", main.connect, 3, 2
Dim ff As New bp1print_ppp
Set ff.DataSource = kk
ff.Sections("section2").Controls.Item("label9").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label10").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label11").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label12").Caption = kk1.Fields(1)
kk1.Close
ff.Sections("section2").Controls.Item("label2").Caption = "共" & classcount & "个班级"
ff.Sections("section2").Controls.Item("label3").Caption = "共" & studentcount & "名学生"
ff.Sections("section4").Controls.Item("label1").Caption = nn & Chr(13) & Chr(10) & yy & "--" & yy + 1 & "学年" & Chr(13) & Chr(10) & "学分报表"
ff.Sections("section1").Controls.Item("text1").DataField = kk.Fields.Item(1).Name
ff.Sections("section1").Controls.Item("text2").DataField = kk.Fields.Item(2).Name
ff.Sections("section1").Controls.Item("text3").DataField = kk.Fields.Item(3).Name
ff.Sections("section1").Controls.Item("text4").DataField = kk.Fields.Item(4).Name
ff.Sections("section1").Controls.Item("text5").DataField = kk.Fields.Item(5).Name
ff.Sections("section1").Controls.Item("text6").DataField = kk.Fields.Item(6).Name
ff.Sections("section1").Controls.Item("text7").DataField = kk.Fields.Item(7).Name
ff.Sections("section1").Controls.Item("text8").DataField = kk.Fields.Item(8).Name
ff.Sections("section1").Controls.Item("text9").DataField = kk.Fields.Item(9).Name
ff.Sections("section1").Controls.Item("text10").DataField = kk.Fields.Item(10).Name
ff.Caption = nn & " " & yy & "学年学分报表"
ff.Show 1
End Sub
Private Sub Command2_Click()
If Option1.Value = True Then
oo = " order by [xh]"
End If
If Option2.Value = True Then
oo = " order by [nn]"
End If
If Option3.Value = True Then
oo = " order by [cl],[xh]"
End If
If Option4.Value = True Then
oo = " order by [whk] DESC"
End If
If Option5.Value = True Then
oo = " order by [x1] DESC"
End If
If Option6.Value = True Then
oo = " order by [x2] DESC"
End If
If Option7.Value = True Then
oo = " order by [x3] DESC"
End If
If Option8.Value = True Then
oo = " order by [x4] DESC"
End If
If Option9.Value = True Then
oo = " order by [zf] DESC"
End If
Dim kk As New ADODB.Recordset
kk.Open "select * from [temp] order by [zf] DESC", main.connect, 3, 2
For i = 1 To kk.RecordCount
kk.Fields("mc") = i
kk.Update
kk.MoveNext
Next
kk.Open "select * from [temp] " & oo, main.connect, 3, 2
Dim kk1 As New ADODB.Recordset
kk1.Open "select * from [nn]", main.connect, 3, 2
Dim ff As New bp1print_ppp
Set ff.DataSource = kk
ff.Sections("section2").Controls.Item("label9").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label10").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label11").Caption = kk1.Fields(1)
kk1.MoveNext
ff.Sections("section2").Controls.Item("label12").Caption = kk1.Fields(1)
kk1.Close
ff.Sections("section2").Controls.Item("label2").Caption = "共" & classcount & "个班级"
ff.Sections("section2").Controls.Item("label3").Caption = "共" & studentcount & "名学生"
ff.Sections("section4").Controls.Item("label1").Caption = nn & Chr(13) & Chr(10) & yy & "--" & yy + 1 & "学年" & Chr(13) & Chr(10) & "学分报表"
ff.Sections("section1").Controls.Item("text1").DataField = kk.Fields.Item(1).Name
ff.Sections("section1").Controls.Item("text2").DataField = kk.Fields.Item(2).Name
ff.Sections("section1").Controls.Item("text3").DataField = kk.Fields.Item(3).Name
ff.Sections("section1").Controls.Item("text4").DataField = kk.Fields.Item(4).Name
ff.Sections("section1").Controls.Item("text5").DataField = kk.Fields.Item(5).Name
ff.Sections("section1").Controls.Item("text6").DataField = kk.Fields.Item(6).Name
ff.Sections("section1").Controls.Item("text7").DataField = kk.Fields.Item(7).Name
ff.Sections("section1").Controls.Item("text8").DataField = kk.Fields.Item(8).Name
ff.Sections("section1").Controls.Item("text9").DataField = kk.Fields.Item(9).Name
ff.Sections("section1").Controls.Item("text10").DataField = kk.Fields.Item(10).Name
ff.Caption = nn & " " & yy & "学年学分报表"
ff.PrintReport False, rptRangeAllPages
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label6.Caption = nn
Label7.Caption = "共有班级" & classcount & "个"
Label8.Caption = "共有学生" & studentcount & "名"
Label1.Caption = yy & "--" & yy + 1
Dim temp As New ADODB.Recordset
temp.Open "select * from [nn]", main.connect, 3, 2
Option5.Caption = temp.Fields(1)
temp.MoveNext
Option6.Caption = temp.Fields(1)
temp.MoveNext
Option7.Caption = temp.Fields(1)
temp.MoveNext
Option8.Caption = temp.Fields(1)
temp.MoveNext
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -