cancel
Showing results for 
Search instead for 
Did you mean: 

EyeCandy for the Users

Former Member
0 Kudos

My boss wants an input field to call up a report which can take as long as 2 minutes to run. I use an iCommand to access a stored procedure that collects the data. While the report is running, the page looks like it is "hung"...don't get any of the animations that would occur when a page is loading.

Is there any way to make it look like something is happening?

Accepted Solutions (1)

Accepted Solutions (1)

sufw
Active Participant
0 Kudos

Hi Ryan,

The "hung" page is due to the browser not refreshing the HTML part of the page while an applet in the page is being executed.

We've tried to solve the problem by using the button's <b>onmousedown</b> and <b>onclick events</b>. The onmousedown event triggers an interface feedback, such as changing the button's colour or printing a message to the screen, while the onclick event triggers the iCommand update, and after completing the applet actions, resetting the page to its original state.

Since the onclick event is only fired when a click is completed (i.e. mouse button down, then up), it is always fired after the onmousedown event. This allows the browser to initiate the interface feedback action before beginning the applet update and should allow you to keep your boss happy

However, I have a feeling that IE won't play animated GIFs while the applet is executing, but I could be wrong on this...

Hope this helps,

Sascha

Former Member
0 Kudos

Thanks very much! I have used this to put a "Please wait...this can take two minutes.." message on the page while waiting for a response from the DB, and this has resolve the issue with my users.

You were right...the animated GIF stopped running while the applet was executing.

Answers (1)

Answers (1)

Former Member
0 Kudos

Ryan:

A good approach is to create an HTML popup window prior to executing the query that says "Please wait...running report", and then close the popup when the query completes.

One other thing you might want to consider is to "pre-stage" the data for this report using a scheduled transaction. Run the query/stored procedure at some fixed time of day (e.g. 6am) and save the query results using the XMLSaver. Then, create an XMLQuery that loads the saved file, and use this as the source of your report.

This is a great approach when the same resultsets will be needed multiple times or if they are predictably needed each day. With a little creativity, you can even name the saved query results with the date/shift/whatever so you can recall them into your reports as needed.

This can even be extended to "prestaging" the report itself. You can run the URL(s) and/or animated objects in the background and "publish" them. This could be on the xMII server (using the various "Saver" actions), or even on a remote web server via FTP.

Best regards,

Rick

Former Member
0 Kudos

Thanks! Prestaging is a good idea.