test_print_report.asp
<html>
<adal>
<meta contenu = text / html; charse = big5 http-equiv = contenu-type>
<Title> Client Use RDS Produce Excel Report </Title>
</ head>
<Body BgColor = SkyBlue TopMargin = 0 Leftmargin = 20 OnContextMenu = return False RightMargin = 0 BottomArgin = 0>
<form action = test_print_report.asp méthode = post name = myform>
<div align = Center> <Fenter>
<Table Border = 5 BGCOLOR = # FFE4B5 Style = Height: 1px; En haut: 0px borderColor = # 0000FF>
<tr>
<td align = Middle BgColor = # ffffff borderColor = # 000080>
<Font Color = # 000080 Size = 3>
Client Use RDS Produce Excel Rapport
</font>
</td>
</tr>
</ table>
</div>
<div align = Left>
<entrée type = Button Value = Query Data Name = Query Language = VBScript onClick = fun_query () style = height: 32px; Largeur: 90px>
<entrée type = Button Value = Clear Data Name = Clear Language = VBScript onClick = fun_clear () style = height: 32px; Largeur: 90px>
<input type = Button Value = Excel RAPPORT NAME = RAPPORT Langue = VBScript onClick = fun_excel () style = hauteur: 32px; Largeur: 90px>
</div>
<div id = addData> </div>
</ form> </ centre>
</docy>
</html>
<Script Language = VBScript>
DIM RDS, RS, DF
Dim StrSql, Strrs, Strcn, Rowcnt
DIM XLAPP, XLBOOK, XLSHEET1, XLMODULE, XLPAGESETUP
Dim Headrowcnt, Titlerowcnt, ContentRowcnt, Footrawcnt
DIM PAGEROWCNT, PAGENO, TOTALPAGECNT, ContentRownowcnt
Dim ColumnallWidth, Columnawidth, ColumnBwidth, ColumnCWidth, ColumnDwidth
sub fun_query ()
set rds = createObject (rds.dataspace)
set df = rds.createObject (rdsServer.datafactory, http: // iscs00074)
strcn = driver = {sql server}; server = iscs00074; uid = sa; app = Microsoft Development Environment; database = pubs; user id = sa; mot de passe =;
strSql = sélectionner * dans les travaux
SET RS = DF.Query (Strcn, StrSQL)
Si ce n'est pas Rs.Eof alors
strrs = <table border = 1> <tr> <td> job_id </td> <td> job_desc </td> <td> max_lvl </td> <td> min_lvl </td> </tr> <tr> <Td> + Rs.GetString (,, </td> <td>, </td> </tr> <tr> <td>,) + </td> </tr> </s table>
adddata.innerhtml = strrs
strrs =
autre
MSGBOX Aucune donnée dans le tableau!
terminer si
Sub-Sub
sub fun_clear ()
strrs =
adddata.innerhtml = strrs
Sub-Sub
sub fun_excel ()
set rds = createObject (rds.dataspace)
set df = rds.createObject (rdsServer.datafactory, http: // iscs00074)
strcn = driver = {sql server}; server = iscs00074; uid = sa; app = Microsoft Development Environment; database = pubs; user id = sa; mot de passe =;
strSql = select count (*) comme recordcnt dans les travaux
SET RS = DF.Query (Strcn, StrSQL)
TotalPageCnt = Rs (RecordCnt)
& n