📄 report_client.asp
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../isuser.asp"-->
<!--#include file="../pub_fun.asp"-->
<HEAD>
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">
<TITLE>客户报表</TITLE></head>
<script language="VBScript">
sub print_onclick()
fm1.txturl.value="show"
fm1.submit
end sub
sub down_onclick()
fm1.txturl.value="down"
fm1.submit
end sub
</script>
<%
''判断操作
if request("txturl")<>"" then
''生成查询条件
textsql=""
''判断是否选择了国家地区
if request("s_nation")<>"0" then
textsql=textsql & " and Client.clientnation='"&trim(request("s_nation"))&"'"
end if
''判断是否选择了省份
if request("s_province")<>"0" then
textsql=textsql & " and Client.clientprovince='"&trim(request("s_province"))&"'"
end if
''判断是否选择了创建者
if request("s_operator")<>"0" then
textsql=textsql & " and Client.clientCreatorID="&trim(request("s_operator"))
end if
''判断是否进行了模糊查询
if trim(request("txtkeyword"))<>"" then
textsql=textsql & " and Client."& request("key_kind") &" like '%"&CheckStrInput(trim(request("txtkeyword")))&"%'"
end if
''查询条件加密
textsql=encrypt(textsql)
''判断是哪种操作,根据操作分别打开不同的显示页面
if trim(request("txturl"))="show" then
''如果是打印报表,打开报表页面
%>
<script language="javaScript">
window.open("show_report_client.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%
else
''否则打开下载页面
%>
<script language="javaScript">
window.open("down_report_client.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>
<%
end if
end if
%>
<body >
<form method="post" name="fm1" >
<input type="hidden" name="txturl">
<table width="751" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><div align="right">
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">
<tr>
<td width="180" bgcolor="#566CDB"><font color="#FFFFFF"><img src="../images/DispStation.gif">报表-客户报表
</font></td>
<td width="300"></td>
<td align="right"><input onclick="javascript:location.href='../menu.asp';" name="BackButton" type="button" class="button_all" value="返回"></td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="middle" bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><fieldset>
<legend>范围选择</legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%"><div align="right">国家/地区: </div>
<div align="right"></div></td>
<td width="80%">
<select name="s_nation" class=text120 >
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct clientnation from client "
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value=<%=rs_s("clientnation")%>> <%=rs_s("clientnation")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr>
<td><div align="right">省份: </div>
<div align="right"></div></td>
<td>
<select name="s_province" class=text120>
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct clientprovince from client"
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value="<%=rs_s("clientprovince")%>"> <%=rs_s("clientprovince")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr>
<td><div align="right">创建者: </div>
<div align="right"></div></td>
<td>
<select name="s_operator" class=text120>
<option value="0" selected >全部</option>
<%
set rs_s = server.createobject("adodb.recordset")
sql_s= "select distinct username,userid from [user] order by userid "
rs_s.open sql_s,conn,3
if not rs_s.eof then
for i=1 to rs_s.recordcount
%>
<option value=<%=rs_s("userid")%>> <%=rs_s("username")%></option>
<%
rs_s.movenext
next
end if
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr>
<td>
<div align="right">模糊查询: </div>
<div align="right"></div>
</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%"><input type="text" name="txtkeyword"></td>
<td width="50%" >
<select name="key_kind" class=text120>
<option value="clientname" selected >客户名称</option>
<option value="clientaddress"> 详细地址</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
</fieldset></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<table width="100%">
<tr>
<td width="80%"> <div align="right">
<input type="button" name="Button" value="下载结果" class="button_all" onClick="down_onclick()"
style="width:100px"></div></td>
<td ><div align="right">
<input type="button" name="Button" value="打印报表" class="button_all" onClick="print_onclick()"
style="width:100px">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</form>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -