Hi,
I am developing a web application using Crystal reports and ASP. I use the examples that Crystal provided but I came across a problem.
When I use the following code, it doesnt seem to release the license in my session. It only releases it after I logout and then come back in. I can see the license released but not during the session the user gets the error.
Does anyone have a solution to this or encountered something like this before?? I'm using CR8.5 developer with W2K and IE 6
Here is the code:
'OPEN THE REPORT (but destroy any previous one first)
If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
'Once an error hits, the program doesnt execute past this until they log out and come back in.
'This detects the number of licenses available to run the reports.
blsActive = Session("oApp".GetLicenseStatus(nLicensed, nActive)
if blsActive=false then
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
'response.write("<!-- <form>"
'response.write("<input type=button value='Close Window' onClick=""javascript:window.close();"">"
'response.write("</form> -->"
response.write("<BODY BGCOLOR=C6C6C6 ONUNLOAD=""CallDestroy();"" topmargin=0 leftmargin=0>"
'response.write("<a href=""menu.asp"" onClick=""javascript:window.close();""><img src=""graphics/mmenu.gif"" width='133' height='44' alt='back to main menu' border='0'></a>"
Response.write("There are currently 5 users accessing the reports. Please try again later<br>"
'Response.write("You will be redirected to the menu page."
'Response.write("<meta http-equiv=""refresh"" content=""4;url=menu.asp""/></head><br>"
response.write("<script language='javascript'>"
response.write("function CallDestroy()"
response.write("{"
response.write(" window.open(""Cleanup.asp"",""Cleanup"",""status=yes,toolbar=yes,location=no,menu=yes,scrollbars=yes""" ',width=1,height=1
response.write(" self.focus()"
response.write("}"
response.write("</script></body>"
Response.End
end if
Thanks for you help,
Will
I am developing a web application using Crystal reports and ASP. I use the examples that Crystal provided but I came across a problem.
When I use the following code, it doesnt seem to release the license in my session. It only releases it after I logout and then come back in. I can see the license released but not during the session the user gets the error.
Does anyone have a solution to this or encountered something like this before?? I'm using CR8.5 developer with W2K and IE 6
Here is the code:
'OPEN THE REPORT (but destroy any previous one first)
If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
'Once an error hits, the program doesnt execute past this until they log out and come back in.
'This detects the number of licenses available to run the reports.
blsActive = Session("oApp".GetLicenseStatus(nLicensed, nActive)
if blsActive=false then
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
'response.write("<!-- <form>"
'response.write("<input type=button value='Close Window' onClick=""javascript:window.close();"">"
'response.write("</form> -->"
response.write("<BODY BGCOLOR=C6C6C6 ONUNLOAD=""CallDestroy();"" topmargin=0 leftmargin=0>"
'response.write("<a href=""menu.asp"" onClick=""javascript:window.close();""><img src=""graphics/mmenu.gif"" width='133' height='44' alt='back to main menu' border='0'></a>"
Response.write("There are currently 5 users accessing the reports. Please try again later<br>"
'Response.write("You will be redirected to the menu page."
'Response.write("<meta http-equiv=""refresh"" content=""4;url=menu.asp""/></head><br>"
response.write("<script language='javascript'>"
response.write("function CallDestroy()"
response.write("{"
response.write(" window.open(""Cleanup.asp"",""Cleanup"",""status=yes,toolbar=yes,location=no,menu=yes,scrollbars=yes""" ',width=1,height=1
response.write(" self.focus()"
response.write("}"
response.write("</script></body>"
Response.End
end if
Thanks for you help,
Will