ASPÔÚµç×ÓÉÌÎñÉÏÓ¦Óù㷺£¬±¨±íµÄ´¦ÀíÓÖÓÐһЩÂé·³¡£±¾ÎĽéÉÜÁËÔÚASPÖÐÀûÓÃ
±¾ÈËдµÄReport Server Page½Å±¾½âÊÍÆ÷ʵÏÖ±¨±íµÄÏÔʾ¡¢´òÓ¡¡£
¡¡¡¡¶þ¡¢×¼±¸¹¤×÷
(1)°²×°Visual Reprort DesignÈí¼þ
Visual Report DesignÊDZ¾ÈËдµÄÒ»¸öÃâ·ÑµÄ±¨±íÉè¼ÆÆ÷£¬³ÌÐòµÄ·¢ÐÐÖ»ÐèÒª
°²×°Ò»¸ö60KµÄ¿Ø¼þ¼´¿É¡£
ÏëÒªµÄÍøÓÑ¿ÉÒÔµ½http://go.163.com/reportpro/ÏÂÔØ
(2)Éè¼Æ±¨±í
ͨ¹ýVisual Report Design µÄ¿ÉÊÓ»¯½çÃæ¿ÉÒÔÉú³É±¨±íµÄ½Å±¾:mxb.rsp¡£
¡¡¡¡Èý¡¢ÊµÏÖ±¨±íµÄ´òÓ¡¡¢ÏÔʾ
ÏÂÃæÊǵ÷ÓõÄÎĵµ:
printmx.asp
<%Option Explicit%>
<%
dim ReportName,ret
dim ReportAtl
dim name
set ReportAtl=Session("ReportAtl")
ReportName=Server.MapPath("mxb.rsp")
ret=reportatl.XMLToVBS(ReportName)
if ret=-1 then
response.write reportatl.ErrorMsg
response.end
end if
ReportName=Server.MapPath("mxb.vbs")
ret=reportatl.DoScript(ReportName)
if ret=-1 then
response.write reportatl.ErrorMsg
set ReportAtl=nothing
response.end
end if
set ReportAtl=nothing
%>
<html>
<OBJECT id=reportatl classid="clsid:D3F064E5-F4C0-4C52-9E7F-263D96B7EA11" codebase="Report.cab#version=1,0,0,1">
</OBJECT>
<script language=vbscript>
dim ret
ret=reportatl.DoPrintReport("mxb.zcg")
if ret=-1 then
msgbox reportatl.ErrorMsg
end if
</script>
</html>
ÓÃVisual Report Design ²úÉúµÄ±¨±í½Å±¾mxb.rsp£º
<?xml version='1.0' encoding='GB2312' ?>
<!DOCTYPE report SYSTEM 'print_report.dtd' >
<report name='±¨±í'>
<report_script>
dim rs,con,sql,lsh
dim temp
set con =CreateObject("ADODB.Connection")
con.ConnectionString = "DBQ=c:\report\demo\asp\report.mdb;DRIVER={Microsoft Access Driver (*.mdb)};"
con.open
Set rs =CreateObject("ADODB.Recordset")
sql="SELECT * FROM cj,student where cj.id=student.id "
rs.open sql,con,1,3
</report_script>
<report_head height='12'>
<text name='vfptext' top='4' left='76' width='26' height='5' font_name='ËÎÌå' font_size='14' font_weight='700' font_italic='0' font_underline='0' >
³É¼¨Ã÷ϸ±í
</text>
</report_head>
<page_head height='6'>
<line name='vfpline' top='0' left='9' width='178' height='0' weight='131072'>
</line>
<line name='vfpline' top='6' left='9' width='178' height='0' weight='131072'>
</line>
<text name='vfptext' top='2' left='18' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
ÐÕÃû
</text>
<text name='vfptext' top='2' left='46' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
ÓïÎÄ
</text>
<text name='vfptext' top='2' left='72' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
Êýѧ
</text>
<text name='vfptext' top='2' left='99' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
Ó¢Óï
</text>
<text name='vfptext' top='2' left='162' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
ºÏ¼Æ
</text>
<text name='vfptext' top='2' left='130' width='6' height='3' font_name='ËÎÌå' font_size='9' font_weight='700' font_italic='0' font_underline='0' >
ƽ¾ù
</text>
</page_head>
<page_body height='8'>
<text name='vfptext' top='2' left='15' width='25' height='4' font_name='ËÎÌå' font_size='9' font_weight='100' font_italic='0' font_underline='0' >
<report_script>
Report.Write cstr(rs("xm"))
</report_script>
</text>
<text name='vfptext' top='2' left='45' width='18' height='4' font_name='ËÎÌå' font_size='9' font_weight='100' font_italic='0' font_underline='0' >
<report_script>
Report.Write cstr(rs("yw"))
</report_script>
</text>
<text name='vfptext' top='2' left='71' width='18' height='4' font_name='ËÎÌå' font_size='9' font_weight='100' font_italic='0' font_underline='0' >
<report_script>
Report.Write cstr(rs("sx"))
</report_script>
</text>
<text name='vfptext' top='2' left='98' width='18' height='4' font_name='ËÎÌå' font_size='9' font_weight='100' font_italic='0' font_underline='0' >
<report_script>
Report.Write cstr(rs("yy"))
</report_script>
</text>
<text name='vfptext' top='2' left='130' width='18' height='4' font_name='ËÎÌå' font_size='9' font_weight='100' font_italic='0' font_underline='0' >
<report_script>
Report.Write cstr((rs("yw") rs("sx") rs("yy"))/3)
ÎÄÕÂÕûÀí£ºÎ÷²¿ÊýÂë--רҵÌṩÓòÃû×¢²á¡¢ÐéÄâÖ÷»ú·þÎñ
http://www.west263.com
ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúÒª×ªÔØ±¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!



