| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1840 人关注过本帖
标题:关于自动求和
只看楼主 加入收藏
jsjlxg
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-20
收藏
 问题点数:0 回复次数:12 
关于自动求和
我想对“合计利润”求和,大侠指教一下!


<%
Response.ContentType="application/msexcel"
response.AddHeader"content-disposition","inline;filename=ysdl_excel_list.xls"
%>
<!--#include file = "onlinecheck.asp" -->
<!--#include file="include/conn.asp" -->
<%
if request("action")="list" then
    if request("idlist")="" then
    Response.Write("<Script Language='Javascript'>alert('您还没有选择要导出的记录!');window.close();</Script>")
    else
    sqlss = "and id in ("&request("idlist")&") "
    end if
else
    dim t2,iftimeduan,riqi,riqi1,riqi2,t11,t18
    
    t2=request("t2")
    iftimeduan=request("iftimeduan")
    
    if iftimeduan=1 then
        riqi=trim(request("riqi"))
    elseif iftimeduan=0 then
        riqi1=trim(request("riqi1"))
        riqi2=trim(request("riqi2"))
        if riqi1="" or riqi1="所有日期" or riqi2="" or riqi2="所有日期" then
            Response.Write("<Script Language='Javascript'>alert('没有选择具体日期,请返回重选!');window.location.href='gjhd_list.asp';</Script>")
        elseif DateDiff("d",riqi1,riqi2)<0 then
            Response.Write("<Script Language='Javascript'>alert('后一日期要比前一日期大,请返回重选!');window.location.href='gjhd_list.asp';</Script>")
        elseif DateDiff("d",riqi1,riqi2)=0 then
            iftimeduan=1
            riqi=riqi1
        end if
    end if
    t11=request("t11")
    t18=request("t18")
    
    
    
    if t2<>"" then
        sqlss=sqlss&" and t2 like '%"&t2&"%'"
    end if
    if t12<>"" then
        sqlss=sqlss&" and t11 like '%"&t11&"%'"
    end if
    if t18<>"" then
        sqlss=sqlss&" and t18 like '%"&t18&"%'"
    end if
    if iftimeduan=1 then
        if riqi<>"" and riqi<>"所有日期" then
            sqlss=sqlss&" and  DateDiff('d',t1,'"&riqi&"')=0 "
        end if
    elseif iftimeduan=0 then
        sqlss=sqlss&" and  DateDiff('d',t1,'"&riqi1&"')<=0 and DateDiff('d',t1,'"&riqi2&"')>=0 "
    end if
end if
%>
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.

<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link rel=File-List href="ysdl_excel_list.files/filelist.xml">
<link rel=Edit-Time-Data href="ysdl_excel_list.files/editdata.mso">
<link rel=OLE-Object-Data href="ysdl_excel_list.files/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>liuhua</o:Author>
  <o:LastAuthor>liuhua</o:LastAuthor>
  <o:Created>2008-01-22T14:30:40Z</o:Created>
  <o:LastSaved>2008-01-22T14:37:08Z</o:LastSaved>
  <o:Company>haotian</o:Company>
  <o:Version>11.6568</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
    {mso-displayed-decimal-separator:"\.";
    mso-displayed-thousand-separator:"\,";}
@page
    {margin:1.0in .75in 1.0in .75in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;}
tr
    {mso-height-source:auto;
    mso-ruby-visibility:none;}
col
    {mso-width-source:auto;
    mso-ruby-visibility:none;}
br
    {mso-data-placement:same-cell;}
.style0
    {mso-number-format:General;
    text-align:general;
    vertical-align:middle;
    white-space:nowrap;
    mso-rotate:0;
    mso-background-source:auto;
    mso-pattern:auto;
    color:windowtext;
    font-size:12.0pt;
    font-weight:400;
    font-style:normal;
    text-decoration:none;
    font-family:宋体;
    mso-generic-font-family:auto;
    mso-font-charset:134;
    border:none;
    mso-protection:locked visible;
    mso-style-name:常规;
    mso-style-id:0;}
td
    {mso-style-parent:style0;
    padding-top:1px;
    padding-right:1px;
    padding-left:1px;
    mso-ignore:padding;
    color:windowtext;
    font-size:12.0pt;
    font-weight:400;
    font-style:normal;
    text-decoration:none;
    font-family:宋体;
    mso-generic-font-family:auto;
    mso-font-charset:134;
    mso-number-format:General;
    text-align:general;
    vertical-align:middle;
    border:none;
    mso-background-source:auto;
    mso-pattern:auto;
    mso-protection:locked visible;
    white-space:nowrap;
    mso-rotate:0;}
.xl24
    {mso-style-parent:style0;
    text-align:center;
    border:.5pt solid windowtext;}
.xl25
    {mso-style-parent:style0;
    font-weight:700;
    text-align:center;
    border:.5pt solid windowtext;}
ruby
    {ruby-align:left;}
rt
    {color:windowtext;
    font-size:9.0pt;
    font-weight:400;
    font-style:normal;
    text-decoration:none;
    font-family:宋体;
    mso-generic-font-family:auto;
    mso-font-charset:134;
    mso-char-type:none;
    display:none;}
.STYLE2 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE3 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE4 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE5 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE6 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE7 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE8 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE9 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE10 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE11 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE12 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE13 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE14 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE15 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE16 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE17 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE18 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE19 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE20 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE21 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE22 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE23 {mso-style-parent: style0; font-weight: 700; text-align: center; border: .5pt solid windowtext; font-size: 12px; }
.STYLE26 {font-size: 12px}
.xl241 {mso-style-parent:style0;
    text-align:center;
    border:.5pt solid windowtext;}
.STYLE81 {font-size: 10pt}
.xl242 {mso-style-parent:style0;
    text-align:center;
    border:.5pt solid windowtext;}
body,td,th {
    font-size: 10pt;
}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>Sheet1</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:Print>
      <x:ValidPrinterInfo/>
      <x:PaperSizeIndex>9</x:PaperSizeIndex>
      <x:HorizontalResolution>300</x:HorizontalResolution>
      <x:VerticalResolution>300</x:VerticalResolution>
     </x:Print>
     <x:Selected/>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>5</x:ActiveRow>
       <x:ActiveCol>4</x:ActiveCol>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
   <x:ExcelWorksheet>
    <x:Name>Sheet2</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
   <x:ExcelWorksheet>
    <x:Name>Sheet3</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>285</x:DefaultRowHeight>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>10800</x:WindowHeight>
  <x:WindowWidth>17100</x:WindowWidth>
  <x:WindowTopX>120</x:WindowTopX>
  <x:WindowTopY>30</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>

<body link=blue vlink=purple>

<table x:str border=0 cellpadding=0 cellspacing=0 width=2845 style='border-collapse:
 collapse;table-layout:fixed;width:1940pt'>
 <col width=122 style='mso-width-source:userset;mso-width-alt:3904;width:92pt'>
 <col width=120 style='mso-width-source:userset;mso-width-alt:3840;width:90pt'>
 <col width=136 style='mso-width-source:userset;mso-width-alt:4352;width:102pt'>
 <col width=95 style='mso-width-source:userset;mso-width-alt:3040;width:71pt'>
 <col width=104 style='mso-width-source:userset;mso-width-alt:3328;width:78pt'>
 <col width=93 span=2 style='mso-width-source:userset;mso-width-alt:2976;
 width:70pt'>
 <col width=109 style='mso-width-source:userset;mso-width-alt:3488;width:82pt'>
 <col width=104 style='mso-width-source:userset;mso-width-alt:3328;width:78pt'>
 <col width=119 style='mso-width-source:userset;mso-width-alt:3808;width:89pt'>
 <col width=116 style='mso-width-source:userset;mso-width-alt:3712;width:87pt'>
 <col width=117 style='mso-width-source:userset;mso-width-alt:3744;width:88pt'>
 <col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>
 <col width=93 style='mso-width-source:userset;mso-width-alt:2976;width:70pt'>
 <col width=96 style='mso-width-source:userset;mso-width-alt:3072;width:72pt'>
 <col width=95 style='mso-width-source:userset;mso-width-alt:3040;width:71pt'>
 <col width=90 style='mso-width-source:userset;mso-width-alt:2880;width:68pt'>
 <col width=91 style='mso-width-source:userset;mso-width-alt:2912;width:68pt'>
 <col width=112 style='mso-width-source:userset;mso-width-alt:3584;width:84pt'>
 <col width=107 style='mso-width-source:userset;mso-width-alt:3424;width:80pt'>
 <col width=124 style='mso-width-source:userset;mso-width-alt:3968;width:93pt'>
 <col width=118 style='mso-width-source:userset;mso-width-alt:3776;width:89pt'>
 <col width=83 style='mso-width-source:userset;mso-width-alt:2656;width:62pt'>
 <col width=146 style='mso-width-source:userset;mso-width-alt:4672;width:110pt'>
 <tr height=25 style='mso-height-source:userset;height:18.75pt'>
  <td width=120 height="25" bgcolor="#FFFF00" class=STYLE2 style='border-left:none;width:90pt'>日期</td>
  <td width=120 bgcolor="#FFFF00" class=STYLE2 style='border-left:none;width:90pt'>客户</td>
  <td width=136 bgcolor="#FFFF00" class=STYLE3 style='border-left:none;width:102pt'>货物名称</td>
  <td width=95 bgcolor="#FFFF00" class=STYLE4 style='border-left:none;width:71pt'>吨位</td>
  <td width=104 bgcolor="#FFFF00" class=STYLE5 style='border-left:none;width:78pt'>箱(罐)号</td>
  <td width=93 bgcolor="#FFFF00" class=STYLE6 style='border-left:none;width:70pt'>联系人</td>
  <td width=93 bgcolor="#FFFF00" class=STYLE7 style='border-left:none;width:70pt'>联系方式</td>
  <td width=109 bgcolor="#FFFF00" class=STYLE8 style='border-left:none;width:82pt'>起讫点</td>
  <td width=104 bgcolor="#FFFF00" class=STYLE9 style='border-left:none;width:78pt'>车号</td>
  <td width=119 bgcolor="#FFFF00" class=STYLE10 style='border-left:none;width:89pt'>运作公司</td>
  <td width=116 bgcolor="#FFFF00" class=STYLE11 style='border-left:none;width:87pt'>提单号</td>
  <td width=117 bgcolor="#FFFF00" class=STYLE12 style='border-left:none;width:88pt'>结算金额</td>
  <td width=114 bgcolor="#FFFF00" class=xl25 style='border-left:none;width:76pt'><p class="STYLE26">兑现(不开票)</p>    </td>
  <td width=93 bgcolor="#FFFF00" class=STYLE13 style='border-left:none;width:70pt'>兑现(开票)</td>
  <td width=96 bgcolor="#FFFF00" class=STYLE14 style='border-left:none;width:72pt'>结算税率</td>
  <td width=95 bgcolor="#FFFF00" class=STYLE15 style='border-left:none;width:71pt'>代理利润</td>
  <td width=91 bgcolor="#FFFF00" class=STYLE16 style='border-left:none;width:68pt'>开票利润</td>
  <td width=91 bgcolor="#FFFF00" class=STYLE17 style='border-left:none;width:68pt'>返税</td>
  <td width=112 bgcolor="#FFFF00" class=STYLE18 style='border-left:none;width:84pt'>合计利润</td>
  <td width=107 bgcolor="#FFFF00" class=STYLE19 style='border-left:none;width:80pt'>发票号码</td>
  <td width=124 bgcolor="#FFFF00" class=STYLE20 style='border-left:none;width:93pt'>兑现日期</td>
  <td width=124 bgcolor="#FFFF00" class=STYLE20 style='border-left:none;width:93pt'>开票日期</td>
  <td width=119 bgcolor="#FFFF00" class=STYLE21 style='border-left:none;width:89pt'>到帐日期</td>
  <td width=83 bgcolor="#FFFF00" class=STYLE22 style='border-left:none;width:62pt'>销售</td>
  <td width=147 bgcolor="#FFFF00" class=STYLE23 style='border-left:none;width:110pt'>异常记录</td>
 </tr>
<%
set rs=server.createobject("adodb.recordset")
sqls = "SELECT * FROM ysdl where id>0 "&sqlss&" order by id desc"
rs.Open sqls, conn, 1, 1
if not rs.eof then
do while not rs.EOF
%>
 <tr height=25 style='mso-height-source:userset;height:18.75pt'>
  <td height="25" class=xl24 style='border-top:none;border-left:none'><span class="xl242" style="height:18.75pt;border-top:none"><%=rs("t1")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t2")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t22")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t23")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t4")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t6")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t8")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t24")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t25")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t11")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t12")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t10")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t13")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t15")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t17")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t3")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t5")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t7")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t9")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t26")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><span class="xl241" style="border-top:none;border-left:none"><%=rs("t142")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t14")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t16")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t18")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t20")%></td>
 </tr>
 <%
rs.MoveNext
loop
end if
rs.close
set rs=nothing
%>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=120 style='width:90pt'></td>
  <td width=120 style='width:90pt'></td>
  <td width=136 style='width:102pt'></td>
  <td width=95 style='width:71pt'></td>
  <td width=104 style='width:78pt'></td>
  <td width=93 style='width:70pt'></td>
  <td width=93 style='width:70pt'></td>
  <td width=109 style='width:82pt'></td>
  <td width=104 style='width:78pt'></td>
  <td width=119 style='width:89pt'></td>
  <td width=116 style='width:87pt'></td>
  <td width=117 style='width:88pt'></td>
  <td width=114 style='width:76pt'></td>
  <td width=93 style='width:70pt'></td>
  <td width=96 style='width:72pt'></td>
  <td width=95 style='width:71pt'></td>
  <td width=91 style='width:68pt'></td>
  <td width=91 style='width:68pt'></td>
  <td width=112 style='width:84pt'></td>
  <td width=107 style='width:80pt'></td>
  <td width=124 style='width:93pt'></td>
  <td width=124 style='width:93pt'></td>
  <td width=119 style='width:89pt'></td>
  <td width=83 style='width:62pt'></td>
  <td width=147 style='width:110pt'></td>
 </tr>
 <![endif]>
</table>

</body>

</html>
搜索更多相关主题的帖子: 求和 
2008-09-20 09:59
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
合计利润在数据库中已经有数据的情况下求和?
2008-09-20 16:07
jsjlxg
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-20
收藏
得分:0 
对该网页数据求和,数据库中有。
2008-09-24 10:41
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
合计利润的字段是哪个?
2008-09-24 12:44
jsjlxg
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-20
收藏
得分:0 
是“结算金额”和“合计利润”。
2008-09-24 19:53
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
<tr height=25 style='mso-height-source:userset;height:18.75pt'>
  <td height="25" class=xl24 style='border-top:none;border-left:none'><span class="xl242" style="height:18.75pt;border-top:none"><%=rs("t1")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t2")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t22")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t23")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t4")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t6")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t8")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t24")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t25")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t11")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t12")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t10")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t13")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t15")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t17")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t3")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t5")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t7")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t9")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t26")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><span class="xl241" style="border-top:none;border-left:none"><%=rs("t142")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t14")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t16")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t18")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t20")%></td>
合计利润是rs("t1")还是什么?
2008-09-24 20:44
jsjlxg
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-20
收藏
得分:0 
t10和t9
2008-09-24 20:52
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
Dim TotalVar
TotalVar=0
do while not rs.EOF
%>
<tr height=25 style='mso-height-source:userset;height:18.75pt'>
  <td height="25" class=xl24 style='border-top:none;border-left:none'><span class="xl242" style="height:18.75pt;border-top:none"><%=rs("t1")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t2")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t22")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t23")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t4")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t6")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t8")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t24")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t25")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t11")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t12")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t10")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t13")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t15")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t17")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t3")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t5")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t7")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t9")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t26")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><span class="xl241" style="border-top:none;border-left:none"><%=rs("t142")%></span></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t14")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t16")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t18")%></td>
  <td class=xl24 style='border-top:none;border-left:none'><%=rs("t20")%></td>
</tr>
<%
TotalVar=TotalVar+rs("t10")+rs("t9")
rs.MoveNext
loop
Response.Write "求和结果为"&TotalVar
2008-09-24 22:12
jsjlxg
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-20
收藏
得分:0 
谢谢,不过好像还不行。
2008-09-29 21:51
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
?怎么?
2008-09-29 22:32
快速回复:关于自动求和
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026481 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved