S
Steven
I have a webpage where the user enters parameters for a report. This
page then post to a 2nd page. In this second page is the code to
create the report. The output of the page when it is complete should
open the report(in excel or snapshot) and then close the page.
action=\aspobjects\ReportPreview.asp target='_blank'>
the ReportPreview page looks like this:
<%
'DECLARTION OF VARIABLES
......
Set oReport = CreateObject("GPReport.clsReport")
'SUBMITT THE REQUEST TO THE REPORT QUEUE SERVER
If ( oReport.RequestReport(Cstr(strReportQueueServer),
CStr(strReportType), Cstr(strWebGroupName), CStr(strInputFileName),
CStr(strReportName), CStr(strSQL), Cstr(strAppName), 180)= True) then
'IF THE REQUEST WAS SUBMITTED SUCCESSFULLY, CHECK TO SEE WHAT TYPE OF
REPORT YOU ARE
filepath = replace(oReport.ReportName, "\", "\\")
%>
<script language="javascript">
window.setInterval(self.close, 2000);
var shell=new ActiveXObject("WScript.Shell");
cmdpath = "\"<%= filepath %>\" "
//alert(cmdpath)
shell.Run(cmdpath,1);
//alert('Closing the Window');
window.setInterval(self.close, 2000);
</script>
<%
Else
The report runs fine, and opens in snapshot or excel. However I am
left with a blank page in a new instance of the browser. On some
computers the new browsers closes????????
Any ideas?????
Thanks
page then post to a 2nd page. In this second page is the code to
create the report. The output of the page when it is complete should
open the report(in excel or snapshot) and then close the page.
<FORM NAME='frmReportpr' method=POSTFrom the prompt page the post looks like this:
action=\aspobjects\ReportPreview.asp target='_blank'>
the ReportPreview page looks like this:
<%
'DECLARTION OF VARIABLES
......
Set oReport = CreateObject("GPReport.clsReport")
'SUBMITT THE REQUEST TO THE REPORT QUEUE SERVER
If ( oReport.RequestReport(Cstr(strReportQueueServer),
CStr(strReportType), Cstr(strWebGroupName), CStr(strInputFileName),
CStr(strReportName), CStr(strSQL), Cstr(strAppName), 180)= True) then
'IF THE REQUEST WAS SUBMITTED SUCCESSFULLY, CHECK TO SEE WHAT TYPE OF
REPORT YOU ARE
filepath = replace(oReport.ReportName, "\", "\\")
%>
<script language="javascript">
window.setInterval(self.close, 2000);
var shell=new ActiveXObject("WScript.Shell");
cmdpath = "\"<%= filepath %>\" "
//alert(cmdpath)
shell.Run(cmdpath,1);
//alert('Closing the Window');
window.setInterval(self.close, 2000);
</script>
<%
Else
The report runs fine, and opens in snapshot or excel. However I am
left with a blank page in a new instance of the browser. On some
computers the new browsers closes????????
Any ideas?????
Thanks