web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Upload Excel file at SFTP server downloading it from Azure Blob.

(0) ShareShare
ReportReport
Posted on by 35

Hi All,

As we know that while running SSRS report in batch mode we could use Print archive facility to be able to download excel files later using Print archive in Organization administration module. These excel files are stored at Azure Blob.

One such excel file gets generated everyday we need to access and upload it to SFTP server. 

If anyone has done it before or has any useful links please share with me. I tried below links but not getting any success in accessing Azure blob itself.

ourcodeworld.com/.../how-to-access-a-sftp-server-using-ssh-net-sync-and-async-with-c-in-winforms

community.dynamics.com/.../copy-file-in-ftp-from-folder-to-another-folder-x

axmriganka.wordpress.com/.../

https://www.c-sharpcorner.com/blogs/sftp-file-upload-with-c-sharp-application

Thanks in advance !!!

Amit Gupta.

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi Amit Gupta,

    You could use following class libraries to access Azure Blob:

    1,CloudBlobClient : Establishes client usage of Azure BLOB storage

    2,CloudBlobContainer : Enables access to created container

    3,CloudStorageAccount : Establishes connection to cloud storage account

    Microsoft.WindowsAzure.Storage.Auth.StorageCredentials storageCredentials = new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials(accountName, key);
    Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = new Microsoft.WindowsAzure.Storage.CloudStorageAccount(storageCredentials, true);
    CloudBlobClient cloudBlobClient =  storageAccount.CreateCloudBlobClient();
     Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference(“.....”);
    

  • Suggested answer
    Sumit Loya Profile Picture
    2,230 on at

    I suggest you look at Power Automate as option. You will be able to access Azure Blob from within X++ but SFTP doesnt have out of box support, you will need 3rd party class libraries to enable that support. Power Automate supports both Azure connectors and SFTP connectors.

  • amigup2020 Profile Picture
    35 on at

    Hi Sumit,

    Challenge with Power automate will be deciding the URL to which batch job running SSRS report will be creating excel sheet at on day to day basis.

    From Finops we could easily get that URL which would keep changing for every new Excel file uploaded by batch job onto Azure blob. Moreover I guess Power automate doesn't comes alongwith normal D365 F&O subscription. I am not sure at it.

    Hence I was trying to find a way out to get X++ work alongwith class created in C#.Net.

    Thanks for your valuable iinputs. I would expedite on them as well. Any other suggestions would be greatly welcomed.

    Best Regards,

    Amit Ashok Gupta.

  • Suggested answer
    Sumit Loya Profile Picture
    2,230 on at

    Hi Amit,

    If that is the case, if you already have a class library that can be used in X++ for connecting to SFTP, then you can also subscribe to delegate toSavePrintArchive in class SRSPrintDestinationSettingsDelegate.

    This delegate is called after report bytes have been generated and before those bytes are saved to Print archive and document attachment.

    Here you will get all report information along with report bytes. This way for your specific report, you will have the report bytes generated which you can then use your class library to upload to SFTP.

    Maybe you can give this a try.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans