Is it possible to run a report that generates several html/pdf files, each one for a seperate customer and then generates a seperate email per customer and attaches the relvant file. The plan is to run a report that automatically sends out an email to every customer that has an outstanding order, on a weekly basis.
I'm fairly amateur when it comes to programming so any help at all would be much appreciated. So far I've managed to get the report to generate an email and send it, but only if I filter on 1 particular customer at a time.
Thanks.
Stewart
0
Comments
The mail cannot be sent before the HTML file is generated and the next customer will have to wait until de last email is correcty sent.
You can try to do this by running all reports/codeunits modaly, which means the main report will stop during the transaction and will only continue afterwards.
Remember that Navision only allows you to use the modal option if you do not change values in the database.
How should I structure my report then?
At the moment I've got 1 report to which formats the data into the view I want (Just a normal report) and another one which calls the first report, then generates the html file and then the email from there.
So for me to get any output I just run the 2nd report. I am having trouble dividing it up between customers. I need the report to get 1 customers details, get the html file, send the email, then get the next customer.
At the moment, I have it generating an html file and it only sends it to the first customer on the list.
Any suggestions would be much appreciated. Thank you.
I've sent it to the download section, it should be available for download there in a couple of days.
If you send me an email I will reply you the solution also.
Part 2 of this project will be to run multiple reports and the distributor should receive a multi page PDF containg multiple reports.
Thanks in advance,
Neil Brewer
Developer
TrinSoft, LLC
Search the forum for topics about the pdf thing.