📄 xxprint_pp.frm
字号:
temp.Fields(10) = Format(f1, "0.0")
temp.Update
temp.AddNew
temp.Fields(3) = "文化课成绩"
temp.Fields(12) = "|"
temp.Fields(10) = Format(wf, "0.0")
temp.Update
temp3.Open "select [tt1].[tkmc],[tt1].[tkmc1],[tt1].[tkmc2],[tt1].[jd],[jc].[jd],[tt1].[jd]*[jc].[jd],[jc].[bz] from [tt1],[jc] where [tt1].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f2, "0.0")
temp.Update
temp3.Open "select [tt2].[tkmc],[tt2].[tkmc1],[tt2].[tkmc2],[tt2].[jd],[jc].[jd],[tt2].[jd]*[jc].[jd],[jc].[bz] from [tt2],[jc] where [tt2].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f3, "0.0")
temp.Update
temp3.Open "select [tt3].[tkmc],[tt3].[tkmc1],[tt3].[tkmc2],[tt3].[jd],[jc].[jd],[tt3].[jd]*[jc].[jd],[jc].[bz] from [tt3],[jc] where [tt3].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f4, "0.0")
temp.Update
temp3.Open "select [tt4].[tkmc],[tt4].[tkmc1],[tt4].[tkmc2],[tt4].[jd],[jc].[jd],[tt4].[jd]*[jc].[jd],[jc].[bz] from [tt4],[jc] where [tt4].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp.AddNew
temp.Fields(1) = "总分"
temp.Fields(10) = Format(zf, "0.0")
temp.Update
temp2.Close
temp.Close
main.connect.Execute "update [t2t2] set [t2]='|' where [t3]<>''"
main.connect.Execute "update [t2t2] set [t5]='|' where [t4]<>''"
main.connect.Execute "update [t2t2] set [t7]='|' where [t6]<>''"
temp.Open "select * from [t2t2]", main.connect, 3, 2
Dim ff As New xxprint_ppp
Set ff.DataSource = temp
temp2.Open "select * from [student] where [ID]=" & idf, main.connect, 3, 2
ff.Sections("section4").Controls.Item("label11").Caption = nn
kkjk = temp2.Fields(1)
ff.Sections("section4").Controls.Item("label3").Caption = temp2.Fields(1)
ff.Sections("section4").Controls.Item("label5").Caption = temp2.Fields(3)
If temp2.Fields(2) = True Then ff.Sections("section4").Controls.Item("label9").Caption = "男" Else ff.Sections("section4").Controls.Item("label9").Caption = "女"
If temp2.Fields(4) = 0 Then
ff.Sections("section4").Controls.Item("label7").Caption = "无"
ElseIf temp2.Fields(4) = 1 Then
ff.Sections("section4").Controls.Item("label7").Caption = "中国共青团员"
Else
ff.Sections("section4").Controls.Item("label7").Caption = "中国共产党员"
End If
ff.Sections("section4").Controls.Item("label17").Caption = mc
ff.Sections("section4").Controls.Item("label15").Caption = yy & "-" & yy + 1 & "学年"
ff.Sections("section4").Controls.Item("label13").Caption = bj
ff.Sections("section1").Controls.Item("text1").DataField = temp.Fields.Item(1).Name
ff.Sections("section1").Controls.Item("text2").DataField = temp.Fields.Item(2).Name
ff.Sections("section1").Controls.Item("text3").DataField = temp.Fields.Item(3).Name
ff.Sections("section1").Controls.Item("text4").DataField = temp.Fields.Item(4).Name
ff.Sections("section1").Controls.Item("text5").DataField = temp.Fields.Item(5).Name
ff.Sections("section1").Controls.Item("text6").DataField = temp.Fields.Item(6).Name
ff.Sections("section1").Controls.Item("text8").DataField = temp.Fields.Item(8).Name
ff.Sections("section1").Controls.Item("text9").DataField = temp.Fields.Item(9).Name
ff.Sections("section1").Controls.Item("text7").DataField = temp.Fields.Item(10).Name
ff.Sections("section1").Controls.Item("text10").DataField = temp.Fields.Item(11).Name
ff.Sections("section1").Controls.Item("text11").DataField = temp.Fields.Item(12).Name
ff.Caption = nn & " " & yy & "学年学分报表--[" & kkjk & "]"
ff.PrintReport
End Sub
Private Sub Command1_Click()
idf = Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1)
xh = ListView1.SelectedItem.Text
na = ListView1.SelectedItem.SubItems(1)
bj = ListView1.SelectedItem.SubItems(2)
Dim temp As New ADODB.Recordset
Dim temp2 As New ADODB.Recordset
Dim temp3 As New ADODB.Recordset
temp.Open "select * from [temp] where [ID]=" & idf, main.connect, 3, 2
If temp.RecordCount = 0 Then Exit Sub
wf = temp.Fields(4)
zf = temp.Fields(9)
f1 = temp.Fields(5)
f2 = temp.Fields(6)
f3 = temp.Fields(7)
f4 = temp.Fields(8)
temp.Close
temp.Open "select count([ID]) from [temp] where [zf]>" & zf, main.connect, 3, 2
mc = temp.Fields(0) + 1
temp.Close
main.connect.Execute "Delete * from [t2t2] "
temp.Open "select * from [t2t2]", main.connect, 3, 2
temp2.Open "select * from nn", main.connect, 3, 2
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f1, "0.0")
temp.Update
temp.AddNew
temp.Fields(3) = "文化课成绩"
temp.Fields(12) = "|"
temp.Fields(10) = Format(wf, "0.0")
temp.Update
temp3.Open "select [tt1].[tkmc],[tt1].[tkmc1],[tt1].[tkmc2],[tt1].[jd],[jc].[jd],[tt1].[jd]*[jc].[jd],[jc].[bz] from [tt1],[jc] where [tt1].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f2, "0.0")
temp.Update
temp3.Open "select [tt2].[tkmc],[tt2].[tkmc1],[tt2].[tkmc2],[tt2].[jd],[jc].[jd],[tt2].[jd]*[jc].[jd],[jc].[bz] from [tt2],[jc] where [tt2].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f3, "0.0")
temp.Update
temp3.Open "select [tt3].[tkmc],[tt3].[tkmc1],[tt3].[tkmc2],[tt3].[jd],[jc].[jd],[tt3].[jd]*[jc].[jd],[jc].[bz] from [tt3],[jc] where [tt3].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp2.MoveNext
temp.AddNew
temp.Fields(1) = temp2.Fields(1)
temp.Fields(10) = Format(f4, "0.0")
temp.Update
temp3.Open "select [tt4].[tkmc],[tt4].[tkmc1],[tt4].[tkmc2],[tt4].[jd],[jc].[jd],[tt4].[jd]*[jc].[jd],[jc].[bz] from [tt4],[jc] where [tt4].[ID]=[jc].[gzid] and [jc].[stid]=" & idf & " and [jc].[xn]='" & yy & "'", main.connect, 3, 2
For i = 1 To temp3.RecordCount
temp.AddNew
temp.Fields(3) = temp3.Fields(0)
If temp3.Fields(1) <> "" Then temp.Fields(4) = temp3.Fields(1)
If temp3.Fields(2) <> "" Then temp.Fields(6) = temp3.Fields(2)
temp.Fields(8) = Format(temp3.Fields(4), "0.0")
temp.Fields(9) = Format(temp3.Fields(3), "0.0")
temp.Fields(10) = Format(temp3.Fields(5), "0.0")
temp.Fields(11) = temp3.Fields(6)
temp.Fields(12) = "|"
temp.Update
temp3.MoveNext
Next
temp3.Close
temp.AddNew
temp.Fields(1) = "总分"
temp.Fields(10) = Format(zf, "0.0")
temp.Update
temp2.Close
temp.Close
main.connect.Execute "update [t2t2] set [t2]='|' where [t3]<>''"
main.connect.Execute "update [t2t2] set [t5]='|' where [t4]<>''"
main.connect.Execute "update [t2t2] set [t7]='|' where [t6]<>''"
temp.Open "select * from [t2t2]", main.connect, 3, 2
Dim ff As New xxprint_ppp
Set ff.DataSource = temp
temp2.Open "select * from [student] where [ID]=" & idf, main.connect, 3, 2
ff.Sections("section4").Controls.Item("label11").Caption = nn
kkjk = temp2.Fields(1)
ff.Sections("section4").Controls.Item("label3").Caption = temp2.Fields(1)
ff.Sections("section4").Controls.Item("label5").Caption = temp2.Fields(3)
If temp2.Fields(2) = True Then ff.Sections("section4").Controls.Item("label9").Caption = "男" Else ff.Sections("section4").Controls.Item("label9").Caption = "女"
If temp2.Fields(4) = 0 Then
ff.Sections("section4").Controls.Item("label7").Caption = "无"
ElseIf temp2.Fields(4) = 1 Then
ff.Sections("section4").Controls.Item("label7").Caption = "中国共青团员"
Else
ff.Sections("section4").Controls.Item("label7").Caption = "中国共产党员"
End If
ff.Sections("section4").Controls.Item("label17").Caption = mc
ff.Sections("section4").Controls.Item("label15").Caption = yy & "-" & yy + 1 & "学年"
ff.Sections("section4").Controls.Item("label13").Caption = bj
ff.Sections("section1").Controls.Item("text1").DataField = temp.Fields.Item(1).Name
ff.Sections("section1").Controls.Item("text2").DataField = temp.Fields.Item(2).Name
ff.Sections("section1").Controls.Item("text3").DataField = temp.Fields.Item(3).Name
ff.Sections("section1").Controls.Item("text4").DataField = temp.Fields.Item(4).Name
ff.Sections("section1").Controls.Item("text5").DataField = temp.Fields.Item(5).Name
ff.Sections("section1").Controls.Item("text6").DataField = temp.Fields.Item(6).Name
ff.Sections("section1").Controls.Item("text8").DataField = temp.Fields.Item(8).Name
ff.Sections("section1").Controls.Item("text9").DataField = temp.Fields.Item(9).Name
ff.Sections("section1").Controls.Item("text7").DataField = temp.Fields.Item(10).Name
ff.Sections("section1").Controls.Item("text10").DataField = temp.Fields.Item(11).Name
ff.Sections("section1").Controls.Item("text11").DataField = temp.Fields.Item(12).Name
ff.Caption = nn & " " & yy & "学年学分报表--[" & kkjk & "]"
ff.Show 1
End Sub
Private Sub Command2_Click()
Dim temp As New xxprint_pall
temp.yy = yy
temp.jj = jj
temp.classcount = classcount
temp.studentcount = studentcount
temp.nn = nn
temp.Show 1
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label6.Caption = nn
Label7.Caption = "共有班级" & classcount & "个"
Label8.Caption = "共有学生" & studentcount & "名"
Label9.Caption = yy & "--" & yy + 1 & "学年"
Dim temp As New ADODB.Recordset
temp.Open "select * from [nn]", main.connect, 3, 2
y = 1
For i = 1 To temp.RecordCount
ListView1.ColumnHeaders(3 + i).Text = temp.Fields(1)
temp.MoveNext
y = y + 1
If y = 5 Then i = temp.RecordCount
Next
temp.Close
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
temp.Open "select * from [temp]", main.connect, 3, 2
Dim itmX As ListItem
For i = 1 To temp.RecordCount
Set itmX = ListView1.ListItems.Add(, "S" & temp.Fields(0), temp.Fields(1), 1, 1)
itmX.SubItems(1) = temp.Fields(2)
itmX.SubItems(2) = temp.Fields(3)
itmX.SubItems(3) = temp.Fields(4)
itmX.SubItems(3) = temp.Fields(5)
itmX.SubItems(4) = temp.Fields(6)
itmX.SubItems(5) = temp.Fields(7)
itmX.SubItems(6) = temp.Fields(8)
itmX.SubItems(7) = temp.Fields(9)
itmX.SubItems(8) = temp.Fields(10)
temp.MoveNext
Next
temp.Close
ListView1.Refresh
End Sub
Private Sub Form_Resize()
On Error GoTo 1
If Me.Height < 3780 Then Me.Height = 3780
If Me.Width < 8000 Then Me.Width = 8000
Picture1.Height = Me.Height - 400
ListView1.Height = Me.Height - 400
Picture2.Top = Me.Height - 400 - Picture2.Height
ListView1.Width = Me.Width - 400 - Picture2.Width - Picture1.Width
Picture2.Left = Me.Width - Picture2.Width - 150
1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -