📄 к+
字号:
<%
dim Pri
Pri=CheckUrl("成绩报表管理")
%>
<!--#include virtual="/school/public/CheckUrl.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>打印学生成绩登记表 write by longZhiping on 1999.8.26</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body background="../../images/di2001.jpg">
<p><font color="#0000a0" size="6"><strong>打印学生成绩登记表</strong>
<object id="rds1" classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" width="0" height="0">
</object>
<object id="rds3" classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" width="0" height="0"></object>
</font><br><img src="../../images/Slidbar.gif" width="760">
<div align="center"><center>
<table border="1" width="760" height="325">
<tr>
<td width="610" height="325" valign="top"><p align="center">
<OBJECT classid=clsid:00028CD1-0000-0000-0000-000000000046
dataSrc=#rds1 height=350 id=grid1 style="LEFT: 0px; TOP: 0px"
width=600 VIEWASTEXT></OBJECT></p>
</td>
<td width="136" height="325" valign="top">
</P>
<hr color="#0000ff">
<P align="center"><input type="button" value="开始打印" onclick="beginPrint()" name="start_input" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px" >
<P align="center"><input type="button" value="全部打印" onclick="Allprint()" name="all_print" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px" >
<P align="center"><input type="button" value="全部取消" onclick="AllNoprint()" name="all_no_print" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px" >
<P align="center"><input type="button" value="退出返回" onclick="returning()" name="exiting" style="COLOR: rgb(0,0,255); FONT-FAMILY: 宋体; FONT-SIZE: 14px" >
</P></td></tr>
</table>
</center></div>
<script language="Vbscript">
dim print_lineno,xhCount,havedCourseCount
dim formatstr,headstr
print_lineno=0
havedCourseCount = 18
RDS1.Server = "http://<%=REQUEST.SERVERVARIABLES("SERVER_NAME")%>"
RDS1.Connect="database=school;uid=sa;pwd=;dsn=school"
rds3.server = "http://<%=REQUEST.SERVERVARIABLES("SERVER_NAME")%>"
rds3.connect ="database=school;uid=sa;pwd=;dsn=school"
rds1.SQL = "Execute createTempclass "
rds1.ExecuteOptions = 1
rds1.Refresh
'Set xlApp = CreateObject("Excel.Application")
'xlApp.Visible = false
'Set xlBook =xlApp.Workbooks.Add
'Set xlSheet = xlBook.Worksheets(1)
sub beginPrint()
'根据用户的选择,一班接一班依次打印
vp.Preview = true
vp.startdoc
rds1.recordset.movefirst
allrecords=rds1.Recordset.recordcount
for i =1 to allrecords
if rds1.Recordset.fields(2).value="打 印" then
call ToClassprint(rds1.Recordset.fields(0).value)
end if
rds1.Recordset.movenext
next
rds1.Recordset.movefirst
vp.EndDoc
'vp.AbortWindowPos=1
'vp.PrintDoc
'vp.SaveDoc "c:\xkprint.prn"
'window.open "http://<%=REQUEST.SERVERVARIABLES("SERVER_NAME")%>/school/public/print.asp"
end sub
'=============================================
sub Allprint() '选择全部班级打印
'=============================================
rds1.recordset.movefirst
allrecords=rds1.Recordset.recordcount
for i =1 to allrecords
rds1.Recordset.fields(2).value="打 印"
rds1.Recordset.movenext
next
rds1.recordset.movefirst
end sub
'================================================
sub AllNoprint() '选择全部班级不打印
'=================================================
rds1.recordset.movefirst
allrecords=rds1.Recordset.recordcount
for i =1 to allrecords
rds1.Recordset.fields(2).value="不打印"
rds1.Recordset.movenext
next
rds1.recordset.movefirst
end sub
'===================================================
sub grid1_BeforeColEdit(colindex,keyascii,cancel)
set colsel = grid1.columns.item(colindex)
select case colsel.caption
case "打印状态"
'colsel.button = true
if grid1.columns.item(colindex).value = "打 印" then
grid1.columns.item(colindex).value = "不打印"
else
grid1.columns.item(colindex).value = "打 印"
end if
cancel = true
case else
cancel = true
end select
end sub
'===================================================
sub ToClassPrint(classno) '打印一班的毕业成绩表
'===================================================
'xlApp.Visible = true
call print_head(classno)
call print_name(classno)
end sub
'=================================================
sub print_head(classno) '打印表头
'=================================================
print_lineno = print_lineno + 3
'打印表头
'xlSheet.Cells(print_lineno, havedCourseCount/2-2) = "学生成绩登记表"
'xlSheet.Cells(print_lineno+1,havedCourseCount/2-2) = "———————"
headstr = "|琼海师范学校"+trim(classno)+"班学生成绩登记表|"
vp.Header = headstr
print_lineno = print_lineno +2
' xlSheet.Cells(print_lineno, 1) = " 班级:"
' xlSheet.Cells(print_lineno, 2) = trim(classno)
formatstr="<+1000|<+1000|"
for i = 3 to 17
formatstr = formatstr + "^+400|"
next
formatstr = formatstr + "800"
headstr = "学号|姓名|||||||段考|||||||期考|总评|备注|"
'xlSheet.Cells(print_lineno+1,1) =" 学号"
'xlSheet.Cells(print_lineno+1,2) =" 姓名"
'xlSheet.Cells(print_lineno+1,9) = " 段考"
'xlSheet.Cells(print_lineno+1,16) = " 期考"
'xlSheet.Cells(print_lineno+1,17) = " 总评"
' xlSheet.Cells(print_lineno+1,18) = " 备注"
'print_lineno = print_lineno +2
end sub
'====================================================
sub print_name(classno) '在左边打印学号,姓名
'====================================================
rds3.sql = "select 学号,姓名 from baseinfo where 班号='"+classno+"' order by 学号 ASC"
rds3.ExecuteOptions =1
rds3.Refresh
xhCount = rds3.Recordset.recordcount
if xhCount <=0 then
msgbox "没有找到此班的学生"
exit sub
end if
for xhloop = 0 to xhCount - 1
onelinstr = ""
'xlSheet.Cells(print_lineno+xhloop, 1) = rds3.Recordset.fields(0).value '打印学号
'xlSheet.Cells(print_lineno+xhloop, 2) = rds3.Recordset.fields(1).value '打印姓名
onelinestr = trim(rds3.Recordset.fields(0).value) + "|" + trim(rds3.Recordset.fields(1).value)+"|"
if xhloop = 0 then
vp.AddTable formatstr,headstr,onelinestr,,,false
else
vp.AddTable formatstr,headstr,onelinestr,,,true
end if
rds3.Recordset.MoveNext
next
print_lineno=print_lineno + xhCount +1
vp.NewPage
end sub
'=======================================================
sub returning() '返回上一层程序
'=======================================================
history.go(-1)
end sub
'==============================================================
</script>
<OBJECT classid=clsid:6E84D662-9599-11D2-9367-20CC03C10627 height=130 id=vp
style="HEIGHT: 375px; WIDTH: 744px" width=300 VIEWASTEXT>
<PARAM NAME="_cx" VALUE="19685">
<PARAM NAME="_cy" VALUE="9922">
<PARAM NAME="Appearance" VALUE="1">
<PARAM NAME="BorderStyle" VALUE="1">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="MousePointer" VALUE="0">
<PARAM NAME="BackColor" VALUE="2147483653">
<PARAM NAME="Font" VALUE="Arial">
<PARAM NAME="HdrFont" VALUE="Courier New">
<PARAM NAME="_ConvInfo" VALUE="1">
<PARAM NAME="AutoRTF" VALUE="-1">
<PARAM NAME="Preview" VALUE="-1">
<PARAM NAME="DefaultDevice" VALUE="0">
<PARAM NAME="PhysicalPage" VALUE="-1">
<PARAM NAME="AbortWindow" VALUE="-1">
<PARAM NAME="AbortWindowPos" VALUE="0">
<PARAM NAME="AbortCaption" VALUE="Printing...">
<PARAM NAME="AbortTextButton" VALUE="Cancel">
<PARAM NAME="AbortTextDevice" VALUE="on the %s on %s">
<PARAM NAME="AbortTextPage" VALUE="Now printing Page %d of">
<PARAM NAME="FileName" VALUE="">
<PARAM NAME="MarginLeft" VALUE="1440">
<PARAM NAME="MarginTop" VALUE="1440">
<PARAM NAME="MarginRight" VALUE="1440">
<PARAM NAME="MarginBottom" VALUE="1440">
<PARAM NAME="MarginHeader" VALUE="0">
<PARAM NAME="MarginFooter" VALUE="0">
<PARAM NAME="IndentLeft" VALUE="0">
<PARAM NAME="IndentRight" VALUE="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -