asp 报表如何显示
时间:2011-06-23
来源:互联网
<%
'response.buffer=true
y1=Trim(Request("y1"))
m1=Trim(Request("m1"))
t1=Trim(Request("t1"))
date1 =y1&"-"&m1&"-"&t1
y2=Trim(Request("y2"))
m2=Trim(Request("m2"))
t2=Trim(Request("t2"))
date2 =y2&"-"&m2&"-"&t2
if not IsDate (date1) or not IsDate(date2) or date1="" or date2="" then
response.write "日期输入错误!"
else
set rs = server.CreateObject("adodb.recordset")
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额
from pro_rukujiben a,pro_rukudan b
where a.rukubianhao=b.rukubianhao and rukushijian between '"&date1&"'and'"&date2&"'group by a.rukushijian"
rs.PageSize = 25
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<div align="center">
<table width="766" height="34" border="0" cellpadding="1" cellspacing="0">
<tr class="tr_southidc">
<td><table width="766" height="34" border="0" cellpadding="1" cellspacing="0">
<tr class="back_southidc">
<td width="113"><div align="center">日期</div></td>
<td width="113"><div align="center">合计金额</div></td>
</tr>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr class="tr_southidc">
<td><div align="center"><%=rs("rukushijian")%></a></div></td>
<td><div align="center"><%=rs("合计金额")%></div></td>
<td> </td>
'response.buffer=true
y1=Trim(Request("y1"))
m1=Trim(Request("m1"))
t1=Trim(Request("t1"))
date1 =y1&"-"&m1&"-"&t1
y2=Trim(Request("y2"))
m2=Trim(Request("m2"))
t2=Trim(Request("t2"))
date2 =y2&"-"&m2&"-"&t2
if not IsDate (date1) or not IsDate(date2) or date1="" or date2="" then
response.write "日期输入错误!"
else
set rs = server.CreateObject("adodb.recordset")
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额
from pro_rukujiben a,pro_rukudan b
where a.rukubianhao=b.rukubianhao and rukushijian between '"&date1&"'and'"&date2&"'group by a.rukushijian"
rs.PageSize = 25
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<div align="center">
<table width="766" height="34" border="0" cellpadding="1" cellspacing="0">
<tr class="tr_southidc">
<td><table width="766" height="34" border="0" cellpadding="1" cellspacing="0">
<tr class="back_southidc">
<td width="113"><div align="center">日期</div></td>
<td width="113"><div align="center">合计金额</div></td>
</tr>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr class="tr_southidc">
<td><div align="center"><%=rs("rukushijian")%></a></div></td>
<td><div align="center"><%=rs("合计金额")%></div></td>
<td> </td>
作者: lihui226 发布时间: 2011-06-23
Microsoft VBScript 编译器错误 错误 '800a0409'
未结束的字符串常量
/baobiao/scjiage.asp,行 25
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额
-----------------------------------------------------------------^
未结束的字符串常量
/baobiao/scjiage.asp,行 25
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额
-----------------------------------------------------------------^
作者: lihui226 发布时间: 2011-06-23
VBScript code
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额 from pro_rukujiben a,pro_rukudan b where a.rukubianhao=b.rukubianhao and rukushijian between '"&date1&"' and '"&date2&"' group by a.rukushijian"
作者: aspwebchh 发布时间: 2011-06-23
sql="select a.rukushijian as 入库时间,sum(cast(b.rkjiagehe as float))as 合计金额
from pro_rukujiben a,pro_rukudan b
where a.rukubianhao=b.rukubianhao and rukushijian between '"&date1&"'and'"&date2&"'group by a.rukushijian"
把这个生成的SQL语句先输出来看看
from pro_rukujiben a,pro_rukudan b
where a.rukubianhao=b.rukubianhao and rukushijian between '"&date1&"'and'"&date2&"'group by a.rukushijian"
把这个生成的SQL语句先输出来看看
作者: lzp4881 发布时间: 2011-06-23
难道是你换行的关系?别换行吧。。
作者: tcwsyt 发布时间: 2011-06-23
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28