Notifications
Announcements
No record found.
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.
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(“.....”);
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.
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 559 Most Valuable Professional
André Arnaud de Cal... 464 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader