我有这样一个页面:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Function rmb(num)
num = FormatNumber(num, 2)
Dim numList
Dim rmbList
Dim numLen
Dim numChar
Dim numstr
Dim n
Dim n1, n2
Dim hz
numList = "零壹贰叁肆伍陆柒捌玖"
rmbList = "分角元拾佰仟万拾佰仟亿拾佰仟万"
If num > 9999999999999.99 Then
rmb = "超出范围的人民币值"
Exit Function
End If
numstr = CStr(num * 100)
numLen = Len(numstr)
n = 1
Do While n <= numLen
numChar = CInt(Mid(numstr, n, 1))
n1 = Mid(numList, numChar + 1, 1)
n2 = Mid(rmbList, numLen - n + 1, 1)
If Not n1 = "零" Then
hz = hz + CStr(n1) + CStr(n2)
Else
If n2 = "亿" Or n2 = "万" Or n2 = "元" Or n1 = "零" Then
Do While Right(hz, 1) = "零"
hz = Left(hz, Len(hz) - 1)
Loop
End If
If (n2 = "亿" Or (n2 = "万" And Right(hz, 1) <> "亿") Or n2 = "元") Then
hz = hz + CStr(n2)
Else
If Left(Right(hz, 2), 1) = "零" Or Right(hz, 1) <> "亿" Then
hz = hz + n1
End If
End If
End If
n = n + 1
Loop
Do While Right(hz, 1) = "零"
hz = Left(hz, Len(hz) - 1)
Loop
If Right(hz, 1) = "元" Then
hz = hz + "整"
End If
rmb = hz
End Function
%>
<%
dim conn,db,sql,rs,zhuyuanhao
zhuyuanhao=session("zhuyuan")
session("zhuyuan")=""
db="/mdb/yiyuan.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
sql="select *from zhuyuan where zhuyuanhao='"&zhuyuanhao&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>打印界面</title>
<style type="text/css">
<!--
.style1 {font-family: "宋体"}
.style2 {font-size: 9pt}
.style4 {font-family: "宋体"; font-size: 9pt; }
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
</head>
<body>
<%if not rs.eof then%>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48"><div align="right" class="style1 style2">No:</div></td>
<td width="169"><div align="left" class="style4"><%=rs("id_no")%></div></td>
<td width="69"><div align="right" class="style4"><%=mid(rs("op_time"),1,4)%>年</div></td>
<td width="69"><div align="right"></div> <div align="right" class="style4"><%=mid(rs("op_time"),6,2)%>月</div></td>
<td width="55"><div align="right"></div> <div align="right" class="style4"><%=mid(rs("op_time"),9,2)%>日</div></td>
<td width="290"><span class="style2"></span></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="89"><div align="right">姓名:</div></td>
<td width="125"><div align="left"><%=rs("sufferer_name")%></div></td>
<td width="133"><div align="right">科别:</div></td>
<td width="87"><div align="left"><%=rs("section_sort")%></div></td>
<td width="130"><div align="right">住院号:</div></td>
<td width="136"><div align="left"><%=rs("zhuyuanhao")%></div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="106"><div align="right">住院费:</div></td>
<td width="121"><div align="left"><%=rs("inhospital_fee")%></div></td>
<td width="113"><div align="right">西药费:</div></td>
<td width="113"><div align="left"><%=rs("wmedicine_fee")%></div></td>
<td width="121"><div align="right">中成药:</div></td>
<td width="126"><div align="left"><%=rs("ccmedicine_fee")%></div></td>
</tr>
<tr class="style4">
<td><div align="right">中草药:</div></td>
<td><div align="left"><%=rs("chmedicine_fee")%></div></td>
<td><div align="right">化验费:</div></td>
<td><div align="left"><%=rs("assay_fee")%></div></td>
<td><div align="right">手术费:</div></td>
<td><div align="left"><%=rs("operation_fee")%></div></td>
</tr>
<tr class="style4">
<td><div align="right">处置费:</div></td>
<td><div align="left"><%=rs("treatment_fee")%></div></td>
<td><div align="right">血费:</div></td>
<td><div align="left"><%=rs("blood_fee")%></div></td>
<td><div align="right">输气:</div></td>
<td><div align="left"><%=rs("oxygen_fee")%></div></td>
</tr>
<tr class="style4">
<td><div align="right">透视费:</div></td>
<td><div align="left"><%=rs("clairvoyance_fee")%></div></td>
<td><div align="right">照相费:</div></td>
<td><div align="left"><%=rs("pictures_fee")%></div></td>
<td><div align="right">物理:</div></td>
<td><div align="left"><%=rs("physics_fee")%></div></td>
</tr>
<tr class="style4">
<td><div align="right">C T:</div></td>
<td><div align="left"><%=rs("ct_fee")%></div></td>
<td><div align="right">病理:</div></td>
<td><div align="left"><%=rs("pathology_fee")%></div></td>
<td><div align="right">核磁:</div></td>
<td><div align="left"><%=rs("hc_fee")%></div></td>
</tr>
<tr class="style4">
<td><div align="right">彩超:</div></td>
<td><div align="left"><%=rs("cultrasonic_fee")%></div></td>
<td><div align="right">取暖:</div></td>
<td><div align="left"><%=rs("warm_fee")%></div></td>
<td><div align="right">护理费:</div></td>
<td><div align="left"><%=rs("nurse_fee")%></div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="130"><div align="right">入院时间:</div></td>
<td width="214"><div align="left"><%=rs("in_time")%></div></td>
<td width="126"><div align="right">出院时间:</div></td>
<td width="230"><div align="left"><%=rs("out_time")%></div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="131"><div align="right">预交金合计:</div></td>
<td width="101"><div align="left"><%=FormatCurrency(rs("in_deposit"))%></div></td>
<td width="116"><div align="right">退款合计:</div></td>
<td width="116"><div align="left"><%=FormatCurrency(CCur(trim(rs("in_deposit")))-ccur(trim(rs("total_fee"))))%></div></td>
<td width="116"><div align="right">退款方式:</div></td>
<td width="120"><div align="left">现金</div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="130"><div align="right">人民币大写:</div></td>
<td width="570"><div align="left"><%=rmb(rs("total_fee"))%><%=FormatCurrency(rs("total_fee"))%></div></td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr class="style4">
<td width="102"><div align="right">收款单位:</div></td>
<td width="152"><div align="left">人民医院</div></td>
<td width="102"><div align="right"><a href="javascript:window.print()">审核:</a></div></td>
<td width="114"><div align="left"></div></td>
<td width="115"><div align="right">结算员:</div></td>
<td width="115"><div align="left"><%=rs("chamberlain")%></div></td>
</tr>
</table>
<%end if%>
</body>
</html>
现在我想将显示为0的费用在界面上不显示,比如说处置费为0
那么处置费这一栏在界面上就不让他显示,而血费这一栏向前提
不知道能否实现
[此贴子已经被作者于2005-12-14 8:19:56编辑过]