Automated Reports via email
Are we able to execute an automated email report each time we enter or execute a 'specified' transaction.
I'm designing and building a DB which currently does most of the hard work within the system.
At the minute, if i want to email, i have to prnt to PDF and save to c drive and email or another derivative.
I'm thinking about constructing a table within the DB, with email client details, email addresses and date and time fields, or fileds that say: every "Friday" or every "31st" or month "end" then send a report named "name of report".
This will then send a report for the client of their stock holding or what ever report i wish to send them.
I would also build into the table the ability to to state each time a specific transaction takes place, ie. Record Save in a Table or each time a DQL, named "whatever" is run that it would also send an email in PDF or another applicable format to the client for whom we've just processed at transaction.
I've no problem constructing the tables and putting the processes together - i theory, what i cant get my head around is how to have a thread open all of the time within the DB to watch what transaction takes place - anyone know?
In my mind i'm thinking that some form of script within each dql or transaction would have to be written to state "if xyz, then execute "EMAIL DQL" or what ever i call it..
Can anyone offer advice or pointers on this?
Regards
Joe Bennett
NEMS Ltd
By:
Joe Bennett
posted: 27th August 2009 - 11:18
Comment this
|