Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Business Central Download file to local computer

(1) ShareShare
ReportReport
Posted on by 219

Hello there.

Using BC 18.

I have a report that creates a file.

The file that gets created gets saved in the server that is running the service.

I want this file to save to the local computer.

Here is my code.

The 3 lines of code below create the file on the server's C -->Temp Drive.

OutputFileName:='C:\Temp\Test.txt';

OutputFile.CREATE(OutputFileName);

OutputFile.CREATEOUTSTREAM(OuputStream);
I am using the following to move the above file to the local workstation C drive.
C419.DownloadHandler(OutputFileName, '', 'C:\Temp', '', 'Test.txt').
The downloadHandler function moves the file to the downloads folder.

What am I doing wrong ? I need the file to go to the local computer running the Web client C->Temp Drive.
Ideas ?
  • Muhammad Israr Profile Picture
    18 on at
    Business Central Download file to local computer
    Hello,

    Did you receive the answer to this question?
  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Business Central Download file to local computer

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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,688 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,643 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans