源码论坛,商业源码下载,尽在锦尚中国商业源码论坛

标题: 刚学asp,遇到一个求和问题 [打印本页]

作者: xiongranxi    时间: 2010-4-27 15:38
标题: 刚学asp,遇到一个求和问题
怎么样把这些列出的费用,也自动求和,显示出来呢?

(, 下载次数: 0)


===========================================================以下是我的代码:

<table width="100%"  border="1" cellspacing="0" bordercolor="#000000">
  <tr bordercolor="#000000">
    <%
drss.movenext
III=III+1
loop
end if
%>
    <td width="8%"><div align="center"><b><b> 类型</b></b></div></td>
    <td width="16%"><div align="center"><b>业务金额</b></div></td>
  </tr>
  <% If Request.QueryString("CurPage")="" or Request.QueryString("CurPage")=0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If

if lid<>"" then
souselect=souselect&" and y_lei="&lid&""
end if
if tt<>"" then
souselect=souselect&" and y_zhuangtai="&int(tt)&""
end if
if request("souname")<>"" then
souselect=souselect&"and (y_zhuti like '%"&request("souname")&"%' or y_user like '%"&request("souname")&"%' or y_bjie like '%"&request("souname")&"%'  or y_user_kehu like '%"&request("souname")&"%')"
end if
set drs= Server.CreateObject("adodb.recordset")
drs.open ("select * from nnt_yewu "&souselect&" "&selectquan&" order by y_stime desc "),conn,1,1

if drs.eof then
                                  Response.Write("<tr><td colspan=6>该公司今日无任何已 完成 业务,请查询后再打印。</td></tr>")
                                  else
                                  
                                  dRS.PageSize=20
        Dim TotalPages   
        TotalPages = dRS.PageCount   
   
        If CurPage>dRS.Pagecount Then     
                CurPage=dRS.Pagecount   
        end if
   
    dRS.AbsolutePage=CurPage   
   
        drs.CacheSize = dRS.PageSize   
         
    Dim y_bjie
        y_bjie=split(drs("y_bjie"),"|@|")
       
       
        Dim Totalcount   
        Totalcount =INT(dRS.recordcount)
        do while (Not dRS.Eof) and (II<dRS.PageSize)
        y_user_kehu=split(drs("y_user_kehu"),"||")
%>
  <script language="JavaScript">
window.onload=function(){
obj=document.all.tags('INPUT');
for(i=0;i<obj.length;i++)
obj.value=(obj.parentElement.parentElement.sectionRowIndex-1);
}
</script>
  <tr bordercolor="#000000"  onmouseover="javascript:bgColor='#C8E4FF'" onmouseout="javascript:bgColor='#ffffff'">
    <td><div align="center"><%= yewulei_fen(drs("y_lei")) %></div></td>
    <td align="center"><% if drs("y_money")>0 then %>
        <font color="#FF3300"><%= FormatCurrency(drs("y_money")) %> </font>
        <% ElseIF drs("y_money")<0 then%>
        <font color="#006600"><%= FormatCurrency(drs("y_money")) %> </font>
        <% end if %></td>
  </tr>
  <tr>
    <td><div align="center" style="font-family: &quot;黑体&quot;; font-size: 14px; font-weight: bold">总金额</div></td>
    <td bordercolor="#000000"><div align="center">1</div></td>
  </tr>
</table>
作者: a887954    时间: 2010-4-27 22:47
顶完了在看看loi




欢迎光临 源码论坛,商业源码下载,尽在锦尚中国商业源码论坛 (https://bbs.52jscn.com/) Powered by Discuz! X3.3