I am quite interested on how I can save a report as html and send it via email (probably via the mail-codeunit). HTML works as a charm, but I just don't find any decent solution for saving to pdf and send it (in one process). Can you help me with this?
But keep in mind that a Navision report saved as HTML can have a messed up lay-out. If this is the case save it as pdf. Don't know how to do that, but I saw a download in the download section which should be the solution.
But now, how to save a report as HTML.
Order.SETTABLEVIEW(SalesHeader);
Order.SAVEASHTML(Filename);
Mail.NewMessage('eromein@home.nl','','Test E-mail','Hereby your order conformation...',Filename,TRUE);
Order = report 205
Be sure to make a uniq Filename (report name + date + time)
Mail = cudeunit mail
Be sure to change the e-mail address to the one of the customer.
Good luck
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."
I think you didn't read my question carefully ... saving as HTML and sending it was no problem for me. indeed, it can have a mixed-up layout, that's why I would want to know how to send it as PDF.
There is a download on mibuso, that claims to export a document from Navision code as pdf. Maybe you should download it and see what is does. I haven't checked it out yet. It could be a solution to your problem / answer to your question.
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."
Comments
You have to program this.
If it was hard to write, it should be hard to understand."
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
But keep in mind that a Navision report saved as HTML can have a messed up lay-out. If this is the case save it as pdf. Don't know how to do that, but I saw a download in the download section which should be the solution.
But now, how to save a report as HTML.
Order = report 205
Be sure to make a uniq Filename (report name + date + time)
Mail = cudeunit mail
Be sure to change the e-mail address to the one of the customer.
Good luck
If it was hard to write, it should be hard to understand."
Thanks anyway for the reply!
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
There is a download on mibuso, that claims to export a document from Navision code as pdf. Maybe you should download it and see what is does. I haven't checked it out yet. It could be a solution to your problem / answer to your question.
If it was hard to write, it should be hard to understand."
eg.
http://www.mibuso.com/forum/viewtopic.php?t=1415
http://www.mibuso.com/forum/viewtopic.php?t=1380
http://www.mibuso.com/forum/viewtopic.php?t=588