Email Crystal Report To Recipient In Database
Posted on 2009-02-17
I am currently working on a solution that will allow all outstanding purchase orders on our ERP system to be automatically emailed to their associated supplier. My plan is to utilise Crystal Reports and InfoView for this.
To make this as easy to use - and dynamic as possible - I'd like to use the email addresses stored in our ERP system. However, I'm unaware of any way of setting the recipient's email address to one that is stored in a database. So, question 1 - does anyone know of a way of doing this? Would I need to look at a VB solution, perhaps?
Secondly, when these orders have been successfully emailed, I need to update a field in our database so, when the report is run again, it doesn't resend the same orders. Is it possible to run an update query on a database upon successful (note the importance of "successful") run?
I'm a little bit stuck as to the best way forward. I could always create one report per supplier, but I'd prefer the system to be more dynamic.
Any help would be greatly appreciated!