Skip to main content

Notifications

Microsoft Dynamics NAV forum
Suggested answer

Report Layout in Email Body

Posted on by 1,112

Dear Sir,

Currently I'm sending NAV PDF Matrix Report in the SMTP Mail attachment using JOB Queue. Now the client wants that the email body should be appeared exactly as Report Layout.

How can I do this ?
Kindly guide me in NAV 2016.

Thanks,

  • yoheswaran Profile Picture
    yoheswaran 225 on at
    RE: Report Layout in Email Body

    can u tell me how to save report to html and convert it to text , then send that text in email body

  • subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    Hi,

    The custom code working perfectly when I execute it manually but it does not work thru Job Queue. Debugger stops at the below mentioned code (at last Line).....

    WordApplication :=WordApplication.ApplicationClass;
    WordDocument :=WordHelper.CallOpen(WordApplication,FileName,FALSE,TRUE);
    FileName2 := TEMPORARYPATH + DELCHR(FORMAT(CURRENTDATETIME),'=','\/:*?"<>| ');
    WordHelper.CallSaveAsFormat(WordDocument,FileName2,WordSaveFormat.wdFormatHTML);

    It throws the error message such as.....

    Microsoft Dynamics NAV
    
    A call to Microsoft.Dynamics.Nav.Integration.Office.Word.WordHelper.CallSaveAsFormat failed with this message: Value cannot be null.
    Parameter name: document
    
    OK



    I can't find the actual reason.

  • subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    Ultimate, I've achieved the goal. Thank you everyone.

  • subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    I have saved the report output as WORD Document & Convert the same into html file. Is it possible to send this html file as Email body in NAV 2016 ?

  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 17,959 Super User 2024 Season 2 on at
    RE: Report Layout in Email Body

    Feature is also avilable with NAV 2016 but not completly baked, but you can do same in NAV 2016 also.

  • subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    I have read the blog, I think it's default feature of NAV 2017.

  • Suggested answer
    subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    Thanks for your reply.

    I got your point. So, I have to move for the Coding Option (Second Option).

  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 17,959 Super User 2024 Season 2 on at
  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,160 Most Valuable Professional on at
    RE: Report Layout in Email Body

    You can attach the report or save the report as pdf or Word Document. The request is quite strange, it’s absolutely correct that the report is attached. You can try to embed the word layout, but it’s not a default feature.

  • subrata.bauri Profile Picture
    subrata.bauri 1,112 on at
    RE: Report Layout in Email Body

    I think there might be a possibility to save the report output as WORD Document and then Send the word document as Email Body in NAV 2016....

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,469 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans