Long Running Report

7 views
Skip to first unread message

David Norman

unread,
Sep 24, 2007, 10:28:42 PM9/24/07
to DesignBais-Forum
I want to initiate a report from a DB form, that is potentially long
running. The report would end up as a csv file, perhaps emailed to the
requester or else available from a DBCALLURL.
If I start this report in a DB form, then it is probably going to
cause the session to time-out, as well as locking the connection while
it runs.
My current thinking is to start a phantom which will send an email
when it finishes.
Anyone have any better ideas ???

Thanks,

Jeff

unread,
Sep 25, 2007, 12:56:30 AM9/25/07
to DesignBais-Forum
I don't know if this qualifies as "better" but you could have your job
write a completion flag to a user file. Then you could set DBTIMER on
your form to poll for that flag and when it finds it you'd unset
DBTIMER (my experience is you don't want to forget to unset this as it
might still affect other forms) and display your CSV.

Really it all depends on whether or not your user wants "fire and
forget" or whether they'll hang around for the results. If you keep
track of the elapsed time you could offer the user an email option if
they're tired of waiting beyond a certain point.

Regards,
Jeff

Tony G

unread,
Sep 25, 2007, 3:02:01 AM9/25/07
to DesignBa...@googlegroups.com

I'm not sure exactly what you're looking for better ideas on, so I'll hit a
few areas and we can focus wherever you want.

Some DB apps have a form where users can go to get a status report on print
jobs. As the reports are being generated they can write status data, like
X out of Y records, and you can use this data to display a progress bar,
estimate completion time, maybe change the method of notification when the
report is complete.

As to what sorts of notification are possible, I've been doing some work in
this area. I will warn you that the following is as much an advertisement
as it is a sincere attempt to get you to let your mind wander about the
possibilities for what you can do with your application :

I've recently created interfaces for outbound messaging from MV apps
through AIM, MSN, or Skype/chat. I've also written "bots" with these chat
clients so that you can send a message to your system to get a status
update. So if you're out of the office you can IM your MV box and ask to
get an IM back when a report is done.

Hold onto your hats... I've also been working on inbound voice inquiries
and outbound voice notifications. So your system can call you on the
telephone when reports are ready, when backups fail, when data is out of
balance, when code breaks, when a system goes down, etc. And you can call
the system and ask it how long it will take for the report to finish, or
ask it to call you when it's done.

Related, I've also done a prototype for a call center interface with
DesignBais - it routes phone calls through Skype to a workstation and sends
caller information to their DB page. I'm working on an auto-dialer through
Skype or PBX from the MV app with IVR (Interactive Voice Response). This
is ideal, for example, for a collection system using DesignBais to make
outbound calls until a live person is on the phone, and then route customer
data and the phone connection to an available DesignBais user. None of
this is theoretical - it's all working, just not packaged as a deliverable.

As to the CSV export, we have a new product coming out very soon which
generates attractive Excel spreadsheets from MV BASIC. I intentionally
structured the interface between app code and XML to look a lot like
DesignBais On-Form Report code. List pricing is not firm but will almost
certainly be less than US$200 per end-user server, with limited 45 day free
trials for developers. I will put a link here shortly to a web page with
sample code, screenshots, and more info.

Some of you developers may not care about texting with your app, having a
phone conversation with a computer, or pretty Excel spreadsheets, but for
the modern-minded people who are looking to buy your software with it's
attractive new DesignBais front-end, this may help to differentiate your
offering from your competition.

Again, just let your mind roam. Now that you're getting away from the
green screen you can start to do anything you want with this stuff.

HTH
Tony Gravagno
Nebula Research and Development
Worldwide sales and development services for
DesignBais, and other developer tools
TG@ removethisNebula-RnD.com

Symeon Breen

unread,
Oct 1, 2007, 9:11:31 AM10/1/07
to DesignBais-Forum
Hi David

This is exactly the same problem I have had - i have processes that
the user initiates where they upload a file and process it through an
ad generation system, this can take a few hours in some circumstances
(8 Gigabit CSV file generating 24million ads). I also have some
reports that take a couple of minutes to collate.

I have done the approach you suggest of running a phantom. The phantom
updates a status record, and i have a modal form that reads this
status record and displays status data. This modal form also has
DBTIMER set so that it refreshes every 10 seconds. The user can go
back into the modal form at any point to see the progress and when the
report/process is finished it gives links to the report download. Also
the process will email the user when it has finished, emailing from
linux is very easy I use mutt or mail commands. For the long running
process i also do a como on at the start and allow the modal form to
display the output of the como file so I can put some nice CRT's in
the output and gain a better understanding of where the program is
upto.

Tony your skype interface sounds very cool - i have downloaded the
skype api months ago but not played with it...


Rgds
Symeon.

David Norman

unread,
Oct 1, 2007, 8:00:58 PM10/1/07
to DesignBais-Forum

Thanks, all.
Symeon, I think I will go down your path (when I get round to it).
It's generally what I was thinking plus some value-added bits ! I
would also email from Unix - this is easy and I already do it in other
systems.

Regards,
David N.

Reply all
Reply to author
Forward
0 new messages