reportcreate.asp
来自「财务管理系统 报账等基本功能实现 有完整的实现」· ASP 代码 · 共 37 行
ASP
37 行
<!--#include file="../../conndb.asp"-->
<!--#include file="ReportToExcel.asp"-->
<!--#include file="CreateSalaryReport.asp"-->
<html>
<head>
<title>创建工资报表</title>
</head>
<body>
<%
Dim im
im = Request("rmonth") '读取报表月份
If im>0 And im<10 Then
im = "0" & CStr(im)
End If
im = Request("ryear") & im '设置报表时间
Set rs = Server.CreateObject("ADODB.RECORDSET")
'检查是否已经创建了此月份的工资报表
sql = "Select * From SalaryStatistics Where iMonth=" & im
Set rs = Conn.Execute(sql)
'判断数据库工资统计表中是否存在此月份的工资记录,如果存在则需要删除后才可以重新创建
If rs.EOF Then
'创建工资表
Call CreateSalaryReport(im)
'显示工资列表(放入excel中或者导入word中)
ReportToExcel (im)
Else
Response.Write "<script>alert('已经存在此月份的工资报表,请选择其他月份');history.back()</script>"
End If
rs.Close()
%>
</body>
<script language="javascript">
// 刷新父级窗口,延迟此关闭
opener.location.reload();
setTimeout("window.close()",600);
</script>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?