Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Export Statement to notepad

(0) ShareShare
ReportReport
Posted on by 2,560

Hi All,

Is it possible to export amount to notepad from Statement when Print = Yes? Any idea? 

Thousand thanks for your help.

Warmest Regards,

Vanessa

*This post is locked for comments

  • Suggested answer
    jcastro Profile Picture
    2,245 on at
    RE: Export Statement to notepad

    Sure. Try this:

    Variable:

    FileMgt - Codeunit - File management

    DestinationFile - Text1024

    Code:

    DestinationFile := FileMgt.SaveFileDialog('Window Title','file.txt','Text files (*.txt)|(*.txt)');

    MESSAGE(DestinationFile);

    Also, you might want to check this out:

    blogs.msdn.com/.../nav-pattern-of-the-week-silent-file-upload-and-download.aspx

  • Vanessa Shin Profile Picture
    2,560 on at
    RE: Export Statement to notepad

    I'm using the method that Jose Castro provided. Thanks for your help.

    By the way, can I just select the file that I need to save as instead of prefix the file name(File1.CREATE( 'C:\Output2.txt');)? Such as prompt a window to request for Open or Save or Cancel the file.

  • Verified answer
    Mohana Yadav Profile Picture
    60,195 Super User 2025 Season 1 on at
    RE: Export Statement to notepad

    Yes, you can directly export as txt file.

    Use the link provided by Jose Castro as sample

  • Verified answer
    jcastro Profile Picture
    2,245 on at
    RE: Export Statement to notepad

    I believe what Mohana was referring to was something like using the tools in this link www.navision-girl.com/.../create-and-write-to-text-file-from.html

    You can use the hierarchy and structure tools a report provides and combine that with the writing directly to an external file (as shown in the previous link).

    Just create the file at the start of the report, write data on each data item you require and close the file when the report execution finishes. That will create a .txt file you can open after with notepad :-)

  • Vanessa Shin Profile Picture
    2,560 on at
    RE: Export Statement to notepad

    Hi Mohana,

    First of all, thanks for your replied.

    If write in report, is it only export details to Microsoft Excel? Is it possible to export details to notepad directly? Any sample?

    Thousand thanks for your help.

    Warmest Regards,

    Vanessa

  • Suggested answer
    Mohana Yadav Profile Picture
    60,195 Super User 2025 Season 1 on at
    RE: Export Statement to notepad

    You can write a report which creates and opens notepad and writes data..

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans