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.

  • Suggested answer
    Aditi_Saha Profile Picture
    10 on at
    RE: Where could we find the excel files stored in Print archive?

    Hello Amit,

    Did you find code? I am having same requirement.

    Thanks in advance,

    Aditi Sahasrabudhe

  • amigup2020 Profile Picture
    35 on at
    RE: Where could we find the excel files stored in Print archive?

    Hi Sumit,

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

    Best Regards,

    Amit Gupta.

  • Suggested answer
    Sumit Loya Profile Picture
    2,230 on at
    RE: Where could we find the excel files stored in Print archive?

    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
    RE: Where could we find the excel files stored in Print archive?

    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 !!!

  • Sumit Loya Profile Picture
    2,230 on at
    RE: Where could we find the excel files stored in Print archive?

    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
    RE: Where could we find the excel files stored in Print archive?

    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 !!!!!

  • Suggested answer
    Sumit Loya Profile Picture
    2,230 on at
    RE: Where could we find the excel files stored in Print archive?

    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
    RE: Where could we find the excel files stored in Print archive?

    Hello Leo Chen,

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

    Best Regards,

    Amit Gupta.

  • amigup2020 Profile Picture
    35 on at
    RE: Where could we find the excel files stored in Print archive?

    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 !!!!

  • Suggested answer
    Leo Chen Profile Picture
    on at
    RE: Where could we find the excel files stored in Print archive?

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

    pastedimage1619661863269v1.png

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... 293,274 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,947 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans