<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<html><body BgColor="aqua" >
<form Name="Fm" action="CrysHtm.php">
<center><Font size=5><B><i><u>ตัวอย่างรายงานจาก Crystal Report</u></I></B></Font></center>
<select name="combo" size="1">
<option >เลือกไฟล์รายงาน</option>
<option value="Reportday.rpt" >Reportday.rpt</option>
</select>
Formula : <input type="text" name="Tx" size=40>
<input type="button" name="Bn" value="Refresh">
</form>
<Div id="Dv" ></Div>
<Hr>
<OBJECT classid = "clsid:CA281D3B-CA98-11CF-9570-00AA0018EA26"
CODEBASE = "ActiveXViewer.cab#Version=1,0,0,0"
id = "CR1"
align = center
width = 100%
height = 85%
hspace = 0
vspace = 0 >
</OBJECT>
<script language="vbscript">
dim ar
sub window_onload
Ck= document.cookie
document.cookie=""
On error resume next
if Ck<>"" then
if instr(Ck,":")=0 then
CR1.ReportFileName = Ck
CR1.GroupSelectionFormula=""
document.Fm.combo.value=Ck
else
ar=split(Ck,":")
ar(1)=replace(ar(1),"#","=")
CR1.GroupSelectionFormula=ar(1)
CR1.ReportFileName = ar(0)
document.Fm.combo.value=ar(0)
Dv.innerText="GroupSelectionFormula : "&ar(1)
end if
end if
CR1.ShowErrors 1
if CR1.ReportFileName<>"" then CR1.Action=1
end sub
Sub Bn_OnClick
if document.Fm.tx.value="" then
document.cookie=document.Fm.combo.value
else
ab=document.Fm.tx.value
ab=replace(ab,"=","#")
Ck=document.Fm.combo.value&":"&ab
document.cookie=Ck
end if
document.Fm.submit()
end sub
</script>
</body></html>