请教高手们一个问题,关于“相同内容的单元格 合并单元格”
ASP程序如下:
Response.write("<table border=1 width='100%' cellspacing=1 align=left cellpadding=3 bordercolor=#ad8c42 style=BORDER-COLLAPSE: collapse;><tr><td align=center width='30%'><b>发单时间</b></td><td align=center width='30%'><b>发单人工号</b></td><td align=center width='40%'><b>发单数字</b></td></tr>")
while (not rs.eof) and (not page_count = rs.pagesize)
dim X_gh,X_zh,x_sj,yinx
X_gh = rs("username")
X_zh = rs("yinxun")
X_sj = rs("royo")
%>
<a id="msg<%=rs("rikki")%>">
<tr class="title2" align="center">
<td >
<% response.write X_sj %>
</td>
<td>
<% response.write X_gh %>
</td>
<td>
<% response.write X_zh %>
</td>
</tr>
<%
page_count = page_count + 1
rs.movenext
wend
%>
</table>
<%
call pages()
rs.close
set rs=nothing
end function
这是一个绘制表格的代码,之前的SQL语句是这样的
sql = "Select max(id) as rikki,format(usertime,'yyyy-mm-dd') as royo,username,count(username) as yinxun from [topic] where replycode <> '1' and isnull(tousu) and ((zu2 like '%"&key&"%') and (usertime >= #"&another&" 00:00:00# and usertime <= #"&shijian&" 23:59:59#)) group by format(usertime,'yyyy-mm-dd'),username order by format(usertime,'yyyy-mm-dd')"
用SQL语句执行后,得到这样的结果(ACCESS)
ID(RIKKI) USERTIME(ROYO) USERNAME YINXUN
省略 2008-1-1 100 1
省略 2008-1-1 200 1
省略 2008-1-1 300 1
省略 2008-1-2 100 1
省略 2008-1-3 100 1
省略 2008-1-4 100 1
省略 2008-1-5 100 1
意思就是 2008-1-1 100号员工发了一个帖子,200号发了1个,300号发了1个……
我的ASP就是想统计每天、每个员工的发单量
目前,最上面给出的ASP代码已经完成了统计工作,得到如下报表
发单时间 发单人工号 发单数字
2008-1-1 100 1
2008-1-1 200 1
2008-1-1 300 1
2008-1-2 100 1
2008-1-3 100 1
2008-1-4 100 1
2008-1-5 100 1
但是,我想要把发单时间一致的合并单元格,也就是这样
发单时间 发单人工号 发单数字
100 1
2008-1-1 200 1
300 1
2008-1-2 100 1
2008-1-3 100 1
2008-1-4 100 1
2008-1-5 100 1
请问语句应该怎么写?求教