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

Where could we find the excel files stored in Print archive?

(0) ShareShare
ReportReport
Posted on by 35

We have a customized SSRS report that runs at batch server and generates excel file that we could download from Organization administration > Inquiries and reports > Print archive.

We have a requirement to publish it at an SFTP server.

Is it possible to see where Print archive stores these excel files for future download. I was planning to access that location through power automate and publish the file at SFTP server shared folder. But I don't know if its possible.

Any help would be of great significance.

Thanks in advance.
Amit Ashok Gupta.

I have the same question (0)
  • zhifeng Profile Picture
    on at

    Hello Amit, 

    To view all reports sent to the archive, navigate Organization administration→ Inquiries→ Print archive. Click on the Print preview button to download the file. By default these files store on azure blob storage and you can simulate this process with your own code to download the file then save to your SFTP. 

  • Suggested answer
    Leo Chen Profile Picture
    on at

    DB stores the URL, and file should be stored in Azure blob. 

    pastedimage1619661863269v1.png

  • amigup2020 Profile Picture
    35 on at

    Hello Kevin,

    Do you have any code specimen to be able to download Excel file and upload at SFTP server? I am not much well versed with Print archive and SFTP.

    Thanks !!!!

  • amigup2020 Profile Picture
    35 on at

    Hello Leo Chen,

    Thanks for your valuable input. I will check for the same and get back.

    Best Regards,

    Amit Gupta.

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

    Hi Amit,

    Print archives are generally stored in PrintJobHeader table with report stored as an attachment. You can probably create  a business event to return the required data based on your report conditions and consume that in power automate.

    The record is saved using SRSPrintArchiveContract class method savePrintArchiveDetails

  • amigup2020 Profile Picture
    35 on at

    Hi Sumit,

    Thanks for your valuable input. I would definitely try out this option. Also as Leo Chen suggested I found out that these excel sheets are stored at Azure blob. I am planning to use its file url and pass in my custom created C# class method that could access Azure blob and download excel file and then upload at SFTP file server.

    Below is C# code I am using to achieve my goal.

    FtpWebRequest ftpClient = (FtpWebRequest)FtpWebRequest.Create(ftpurl + "/" + filename);

               ftpClient.Credentials = new System.Net.NetworkCredential(ftpusername, ftppassword);

               ftpClient.Method = System.Net.WebRequestMethods.Ftp.UploadFile;

               ftpClient.UseBinary = true;

               ftpClient.KeepAlive = true;

               System.IO.FileInfo fi = new System.IO.FileInfo(fileurl);

               ftpClient.ContentLength = fi.Length;

               byte[] buffer = new byte[4097];

               int bytes = 0;

               int total_bytes = (int)fi.Length;

               System.IO.FileStream fs = fi.OpenRead();

               System.IO.Stream rs = ftpClient.GetRequestStream();

               while (total_bytes > 0)

               {​​​​​​​

                   bytes = fs.Read(buffer, 0, buffer.Length);

                   rs.Write(buffer, 0, bytes);

                   total_bytes = total_bytes - bytes;

               }​​​​​​​

               //fs.Flush();

               fs.Close();

               rs.Close();

               FtpWebResponse uploadResponse = (FtpWebResponse)ftpClient.GetResponse();

           string value = uploadResponse.StatusDescription;

               uploadResponse.Close();

    Please feel free to provide inputs from your side if any. This way I think I could direct leverage .Net framework capabilities without involving Power automate.

    Thanks !!!!!

  • Sumit Loya Profile Picture
    2,230 on at

    Hi Amit,

    Are you uploading to FTPS (Secure FTP) or SFTP (SSH File Transfer Protocol). SFTP cannot be connected using FtpWebRequest thats an SSH protocol. There is no out of box library. you will need to use a 3rd party SFTP library for same. Just be sure of what the customer is meaning by SFTP. We generally assume SFTP to be SSH FTP.

  • amigup2020 Profile Picture
    35 on at

    Hi Sumit,

    Thanks for prompt response. My client is using SFTP. As per your comments then I have to completely redesign my approach.

    Is it possible for Power automate to access Azure blob?

    Thanks !!!

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

    Hi Amit,

    There are out of box connectors for Azure Blob Storage. You can explore them.

    Check the link here docs.microsoft.com/.../

  • amigup2020 Profile Picture
    35 on at

    Hi Sumit,

    Thanks a ton. I will explore this option to achieve desired output.

    Best Regards,

    Amit Gupta.

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 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans