473,626 Members | 3,221 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display message for long running server logic

GB
Okay, here is what I am trying to do

We have a dialog of windows that collects information for generation of a dynamic HTML report. The last page in the wizard dialog accepts all report options (in XML format) and calls a business tier object in the pageLoad event, which creates the HTML report file. This file is then streamed to the client

This process works well, and whilst we have tuned it to death it still takes between 1-5 seconds based on its size

I would like a 'Report is being generated' type of message to be displayed whilst the report generation logic is running in the middle tier. Given the way the solution is architected I am not sure how to do this, or even if it is possible

My initial thought was to have the initial state of the page displaying the appropriate message. Then in the client side pageLoad event triggers a postback, which would perform the report generation logic. Once complete the report would be streamed to the client

Any help here would be wonderful..

GB
Nov 18 '05 #1
5 2346
You could display a 'Report is being generated' message to the user and set a session variable on the page. The page would keep refreshing until that session variable had changed, then would take the user to the appropriate page (or just show and hide the appropriate control).
Nov 18 '05 #2
GB
How would you periodically refresh the page? The refresh would have to be initiated from the client wouldn't it?
Nov 18 '05 #3
Do some searching on "Meta Refresh" on google.

Going back to your original question, you might want to look into threading.
I've used it in the past for this sort of thing and it works great!

http://www.fawcette.com/vsm/2002_11/...tures/chester/

Michael

"GB" <an*******@disc ussions.microso ft.com> wrote in message
news:F4******** *************** ***********@mic rosoft.com...
How would you periodically refresh the page? The refresh would have to be

initiated from the client wouldn't it?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.573 / Virus Database: 363 - Release Date: 1/28/2004
Nov 18 '05 #4

SetInterval script function can be used to execute a script function (client side) after specific intervals. From within this function, you can pass a call to the server to check if the report generation is complete. but this actually depends on how your implementation is

hope this help

Augustin
Nov 18 '05 #5
If you make sure buffering is off you could output JavaScript messages to
the client which update a progress bar, we use a similar technique with an
online newsletter mailing system
http://www.3internet.com/products/In...ilshooter.aspx

You could use a table with an image in it acting as your progress bar.

You would then simple output some JavaScript such as....
<SCRIPT>
var maxImageWidth = 400;

function updateProgress( prcntge) {
// Change the size of the image with the name progressImage (or use
id=progressImag e and document.getEle mentById("progr essImage"))
document.images["progressIm age"].width = (prcntge/100) * maxImageWidth;
//
// you could also update a text field to show percentage completion in a
similar way
//
}
</SCRIPT>

Then you would output subsequent script blocks as you process runs giving a
percentage completion, you can output as many of these as you would like....

<SCRIPT>
updateProgress( 10);
</SCRIPT>

When the process has completed you could either hide the table by setting
the display style property to none, or you could simply redirect to the
generated page using javascript (that's assuming that page generates a hard
copy to redirect to)

Matt
http://www.3internet.com

"GB" <an*******@disc ussions.microso ft.com> wrote in message
news:BA******** *************** ***********@mic rosoft.com...
Okay, here is what I am trying to do.

We have a dialog of windows that collects information for generation of a dynamic HTML report. The last page in the wizard dialog accepts all report
options (in XML format) and calls a business tier object in the pageLoad
event, which creates the HTML report file. This file is then streamed to
the client.
This process works well, and whilst we have tuned it to death it still takes between 1-5 seconds based on its size.
I would like a 'Report is being generated' type of message to be displayed whilst the report generation logic is running in the middle tier. Given the
way the solution is architected I am not sure how to do this, or even if it
is possible.
My initial thought was to have the initial state of the page displaying the appropriate message. Then in the client side pageLoad event triggers a
postback, which would perform the report generation logic. Once complete
the report would be streamed to the client.
Any help here would be wonderful...

GB

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
1491
by: Eric J. Holtman | last post by:
I feel like the answer to this should be blinding obvious. I also feel like it's probably an exercise in an undergraduate database design course. I'm off to google for an answer, but I figure I'd throw it out here to see if there's a quick and dirty solution. I have in my database a table of every position we have here called Holdings. It would be equivalent to an Inventory table in every basic design course. There are many users...
0
5807
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database which indexes computer magazine articles for personal reference. I am developing a Visual Basic.NET program whose sole purpose is to enter new records into the database. No updates to existing entries, no deletions, and no display
1
6009
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the browser back button, it loads the progress bar again. Any solution to this?
6
2113
by: johntarr | last post by:
I hope I am not asking about something that has been done before, but I have searched and cannot find an answer. What I am trying to do is to run a query, and then perform some logic on the rowcount and then possibly display the result of the query. I know it can be done with ADO, but I need to do it in Query Analyzer. The query looks like this: select Var from DB where SomeCriteria
4
3257
by: Jono | last post by:
Hi Everyone, As it says in the title, I'm looking for a way to display a page while long running operations are performed on the server. Ideally, I'd like some way to push the current request onto some stack, where it would continue to be processed asynchronously (most importantly preserving things like view state, form post data, etc). In the interim, while the main request is processed, a friendly page will be displayed to the user....
9
2579
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo" runat="server"/> <asp:Label ID="CompanyPicture" runat="server"/> I have 2 links that open the windows to preview these images. The previewed images are done on separate html pages that do nothing but display the
14
23146
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
5
4310
by: zlf | last post by:
Hello, I try to use a custom HttpHandler to add something to session, then display the original page. public void ProcessRequest(HttpContext context) { context.Session = "test"; } But, a empty page is rendered with this HttpHandler, should I add some
4
5395
by: Simon | last post by:
If I am running a long time query, how to show a wait page at then? Is there any recommended way to do it? Thanks.
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.