Username: Password:

ASP控制每页打印行数
来源:作者: 发布时间:2007-11-09 05:14:02

<%
pagenum=55’指定打印行数
%>



销售利润明细报表打印






<%
kdname1=trim(request("kdname1"))
kdname2=trim(request("kdname2"))
keyword1=trim(request("keyword1"))
keyword2=trim(request("keyword2"))

if keyword1<>"" then
today=keyword1
else
if kdname1="" then
today=year(date())&"-"&month(date())
else
today=kdname1&"至"&kdname2
end if
end if
%>




销售利润汇总报表


<%
strSQL="select autoid,sellautoid,productxili,productname,productsize,productnum,productdan,productjia,chaoshi,tiaoma,youhui,fukuan,moncount1,gongshang,lirun1,username,indate,fudate from sell where officename=’"&trim(request.cookies("Myoffice"))&"’ and monthjie=’0’ and (year(indate)=year(getdate()) and month(indate)=month(getdate())) and zhuofei is null order by autoid desc"
set rs1=server.createobject("adodb.recordset")
rs1.open strSQL,conn,1,1
%>















销售单号 商品名称(规格) 客户 数量 单位 销售价 折% 进货价 小计 利润 付款 销售日期

<%
moncount2=0
moncount5=0
Do while not rs1.eof
%>

<%
for i=1 to pagenum
if not rs1.eof then
if trim(rs1("fukuan"))="欠款" then
moncount6=Csng(rs1("lirun1"))
moncount5=moncount5+moncount6
else
moncount3=Csng(rs1("lirun1"))
moncount2=moncount2+moncount3
end if
%>














<%
rs1.movenext
end if
next
%>
 <%=rs1("sellautoid")%> <%=Decode(rs1("productname"))%> <%=rs1("productsize")%> <%=left(rs1("gongshang"),9)%> <%=rs1("productnum")%> <%=rs1("productdan")%> <%=formatNumber(rs1("chaoshi"),varnum,-1)%> <%=rs1("youhui")%> <%=formatNumber(rs1("productjia"),varnum,-1)%> <%=formatNumber(rs1("moncount1"),varnum,-1)%> <%=formatNumber(rs1("lirun1"),varnum,-1)%> <%if trim(rs1("fukuan"))="欠款" then%><%=rs1("fukuan")%><%else%><%=rs1("fukuan")%><%end if%> <%=rs1("indate")%>

<%
if not rs1.eof and i=pagenum+1 then ’添加分页标记
%>
 

















<%
end if
loop
rs1.close
set rs1=nothing
%>
销售单号 商品名称(规格) 客户 数量 单位 销售价 折% 进货价 小计 利润 付款 销售日期





现金利润:<%=formatNumber(moncount2,varnum,-1)%>   <%if moncount5<>"" then%>欠款利润:<%=formatNumber(moncount5,varnum,-1)%><%end if%>   <%if moncount5<>"" then%>毛利合计:<%=formatNumber(moncount5+moncount2,varnum,-1)%><%end if%>

<%
end if
conn.close
set conn=nothing
%>






喜欢本文,那就收藏到:

    Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网
相关评论  我也要评论
还没有关于此文章的相关评论!
  • 昵称: (为空则显示guest)
  • 评论分数: ★ ★ ★★★ ★★★★ ★★★★★
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 导航
    赞助商
    文章类别
    订阅