I ran into a technical roadblock and wonder if anyone has a solution or suggestions. Scenario and background as follows:
1. I'm using Telerik Reporting to generate a number of reports in a web site (built with ASP .Net 2.0) . I'm not using the report viewer, rather the report is streamed to the user as PDF files from which they can print or save as appropriate. This is accomplished via the following code sequence (pretty standard technique I believe):
2. From the report web page, the user clicks the Generate button to generate a selected report. As soon as this button is clicked, the mouse cursor turns to an hourglass. This is accomplished via a simple client-side javascript function that sets the cursor style to hourglass in conjunction with setting the "onClick" attribute for the button Generate, (in page_load event), as follows:
function hourglass()
{document.body.style.cursor = "wait";}
' This is set in the page_load event of the aspx.vb file
btnGenerate.Attributes("onclick") = "javascript: hourglass();"
3. In real time, the user clicks the Generate button, the mouse cursor turns to hourglass (by virtue of the client-side action mentioned above) while the report is being generated. After a period of time, the PDF download dialog appears on top of the report web page. The user opens the PDF file, prints it and then closes the PDF file. Everthing works fine up to this point.
4. Once the PDF file is closed, the report web page is, of course, still there. The problem is the mouse cursor is still showing the hourglass.
5. The problem appears to lie in the fact that the cursor is never reset to the default style. And it appears that there isn't an opportunity to reset the cursor because there isn't a postback to the report web page AFTER the user has printed the PDF file and closes the PDF application.
I've tried adding client-side javascript to reset the cursor at window.onload. It doesn't do it because the report web page is NOT reloaded after the PDF file is generated.
I hope this makes sense. I'd appreciate if anyone has any suggestions.
Thanks.
Barry
1. I'm using Telerik Reporting to generate a number of reports in a web site (built with ASP .Net 2.0) . I'm not using the report viewer, rather the report is streamed to the user as PDF files from which they can print or save as appropriate. This is accomplished via the following code sequence (pretty standard technique I believe):
Response.Clear()
Response.ContentType = strMimeType
Response.Cache.SetCacheability(HttpCacheability.Private)
Response.Expires = -1
Response.Buffer =
False
Response.AddHeader("content-disposition", _
"attachment; filename=""" & strFileName & """")
Response.OutputStream.Write(reportBytes, 0, reportBytes.Length)
Response.End()
2. From the report web page, the user clicks the Generate button to generate a selected report. As soon as this button is clicked, the mouse cursor turns to an hourglass. This is accomplished via a simple client-side javascript function that sets the cursor style to hourglass in conjunction with setting the "onClick" attribute for the button Generate, (in page_load event), as follows:
function hourglass()
{document.body.style.cursor = "wait";}
' This is set in the page_load event of the aspx.vb file
btnGenerate.Attributes("onclick") = "javascript: hourglass();"
3. In real time, the user clicks the Generate button, the mouse cursor turns to hourglass (by virtue of the client-side action mentioned above) while the report is being generated. After a period of time, the PDF download dialog appears on top of the report web page. The user opens the PDF file, prints it and then closes the PDF file. Everthing works fine up to this point.
4. Once the PDF file is closed, the report web page is, of course, still there. The problem is the mouse cursor is still showing the hourglass.
5. The problem appears to lie in the fact that the cursor is never reset to the default style. And it appears that there isn't an opportunity to reset the cursor because there isn't a postback to the report web page AFTER the user has printed the PDF file and closes the PDF application.
I've tried adding client-side javascript to reset the cursor at window.onload. It doesn't do it because the report web page is NOT reloaded after the PDF file is generated.
I hope this makes sense. I'd appreciate if anyone has any suggestions.
Thanks.
Barry