Generating time consuming reports

I have a method that takes and calculates up several fields based on a number of criteria. It aslo deals with a couple of thousand of records in one report generation. It takes about 45 seconds to 1 minute to run the entire report. Not long, but long enough that I want to tell the user, don’t do anything the report is running.

So, at the beginning of the report run I have a “show form in dialogue” line that is run telling the user the report generation is in progress please wait. I also have a little animated gif of a progress bar so it looks like something is happening.
When the report is done, I then have a “close form in dialogue” command.

My problem is that as long as the form in dialogue box is open, the method will not continue. I must first close the dialogue box and then the method will continue. This of couse defeats the purpose of the dialogue box.
Is there a way I can tell the method to run the dialogue box, but then keep going with the rest of the method?

Jim,

Short answer = no.

Longer answer - use the free dialog plug-in by IT2Be (http://www.it2be.com). You can put a “message” up (and even a progress bar, I believe).

Works great for LAN clients - for Web Client - use the “fake” FID technique.

Hope this helps.

Or simply run the method that builds the report on the onShow event of the FID.
If you use some loops in your method consider using the Jprogress bean to show the progress to the user, you can find some good examples in the forum.

Jim
You may also consider using JasperReports. They are extremely quick! Once you have designed the reports and decided on what params to pass for a couple of reports I think you will find you will develop these reports faster in Jasper. I recommend the online training that will soon be available to purchase from our store, which includes a Jasper Plugin license.

Hope to see you at ServoyWorld

All the best

Just an idea: what about making a headless solution that runs on server as a batch process and that handles these time consuming and not interactive tasks?

One technique I have used to achieve this; create a form that will be displayed as a dialog with an instance of the progress bean in it. The onShow event of this form uses the eval() function to call a method named in a global .

This allows you to run any method you want from this dialog form (you need to include the code to control the progress bean obviously). Works well.