<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="conn.asp"-->
<!--#include file="fy.asp"-->
<!--#include file="head.asp"-->
<LINK href="admin.css" type=text/css rel=stylesheet>
<h3>出入汇总</h3>
<%
pch=trim(request.form("pch"))
set conn = Server.CreateObject("ADODB.Connection")
conn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" &_
Server.MapPath("crk.mdb"))
page=request("page")
if page="" then page=1
if isnumeric(page)=false then page=1
page=clng(page)
set rs=server.CreateObject("adodb.recordset")
if pch<>"" then
sql="select * from ruku where pch='"&pch&"' "
else
sql="select pch,spbm,spmc,sum(zzl) as zzlh ,djzl,chuwei,sum(rksl) as rkslh from ruku group by pch,spbm,spmc,djzl,chuwei"
end if
rs.pagesize=10
rs.open sql,conn,3,2
if not rs.eof then
rs.absolutepage=page
ipage=0
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-top:1px solid #acacab;border-left:1px solid #acacab;border-right:1px solid #acacab;border-bottom:1px solid #acacab;">
<tr>
<td height="25" colspan="11"><div align="center"><a href="ruku.asp">查看全部</a></div></td>
</tr>
<tr>
<td height="25" colspan="11"><div align="center">
<form id="form1" name="form1" method="post" action="ruku.asp">
<label>请输入批次号:
<input name="pch" type="text" id="pch" size="15" />
</label>
<label>
<input name="submit" type="submit" id="pch" value="提交" />
</label>
</form>
</div></td>
</tr>
<tr>
<td width="10%" height="25"><div align="center">批次号</div></td>
<td width="8%" height="25"><div align="center">商品编码</div></td>
<td width="14%" height="25"><div align="center">商品名称</div></td>
<td width="8%" height="25"><div align="center">总重量</div></td>
<td width="8%" height="25"><div align="center">单件重量(kg)</div></td>
<td width="8%" height="25"><div align="center">储位</div></td>
<td width="8%" height="25"><div align="center">入库数量</div></td>
<td width="8%" height="25"><div align="center">出库数量</div></td>
<td width="8%" height="25"><div align="center">结存</div></td>
</tr>
<%
do while not rs.eof and ipage<rs.pagesize
set rs2=server.CreateObject("adodb.recordset")
sql="select * from chuku where pch='"&rs("pch")&"' and spbm='"&rs("spbm")&"' and djzl='"&rs("djzl")&"' and chuwei='"&rs("chuwei")&"'"
rs2.open sql,conn,3,2
if not rs2.eof then
set rs3=server.CreateObject("adodb.recordset")
sql="select sum(cksl) as ckslh from chuku where pch='"&rs("pch")&"' and spbm='"&rs("spbm")&"' and djzl='"&rs("djzl")&"' and chuwei='"&rs("chuwei")&"'"
rs3.open sql,conn,3,2
else
jiecun=rkslh-ckslh
end if
%>
<tr>
<td height="25"><div align="center"><%=rs("pch")%></div></td>
<td height="25"><div align="center"><%=rs("spbm")%></div></td>
<td height="25"><div align="center"><%=rs("spmc")%></div></td>
<td height="25"><div align="center"><%=rs("zzlh")%></div></td>
<td height="25"><div align="center"><%=rs("djzl")%></div></td>
<td height="25"><div align="center"><%=rs("chuwei")%></div></td>
<td height="25"><div align="center"><%=rs("rkslh")%></div></td>
<td height="25"><div align="center"><%=rs("ckslh")%></div></td>
<td height="25"><div align="center"><%=jiecun%></div></td>
</tr>
<%
ipage=ipage+1
rs.movenext
loop
end if
%>
<tr>
<td colspan="11">
<div align="center"> <%call showpage(rs.recordcount,rs.pagesize,page,"?fl="&fl&"&")%></div></td>
</tr>
</table>
注:pch:批次号;spbm:商品编码;spmc:商品名称;zzl:总重量;djzl:单件重量;chuwei:储位;rksl:入库数量
cksl:出库数量;jiecun:结存。
这是我写的,出现了这样的错误,找不到出库数量合计
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/xyck/crhuizong.asp, 第 132 行
希望高手们指点一下,告诉我怎么改才对。