Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sorcerorkazin
New Member

Serving PDFs From Report

Hello,

 

I have searched all I could and probably I missed something somewhere. To put it simply, what I am trying to achieve is to allow the user to search for documents based on a few columns from an SQL Server (2019 if it matters), give a preview for the PDF, and allow the user to download that PDF.

 

Long version

 

We have an SQL Server that contains contract information and we save the PDFs as a column in a table. I want to be able to create a way for users to search for the document and be able to download it as well. I was able to do two of the three things I want to do. I was able to create the report to allow the user to filter out information in order to locate the report, I was able to use a custom visual PDFViewer to allow the user to preview the PDF, but it seems that there is no "save" function on this custom visual. I thought about doing it using base64 and an HTML custom visual, however in my attempts they either display the encoded file in what appears to be something like an iframe (using HTML Content custom visual) or the error message "Link is malformed" will be thrown (using Shielded HTML Viewer). I know what you are thinking, maybe create a web server to accept a request say with a primary key id in the URL, but the thing is with the way the DoD is going in making everything work from the cloud, they are being more strict in approving on premise servers. I want to first exhaust all options before going through the loops to get a webserver approved. Please let me know if Power BI has no way of doing this, I wouldn't mind. Like I said we can do the webserver solution, but it is my last resort. 

1 ACCEPTED SOLUTION
josef78
Memorable Member
Memorable Member

Your PDF's are stored in DB as blob?

 

I think, there no built-in Power BI function to render PDF.

 

You can try (re)develop custom visual as PDF viewer, with Save as option.

 

But much more easily, you can develop very simple web aspx page, which will serve document based on URL link (with some Id or token) from connected DB. But for it you will need some IIS server (or another technology), which you can host on Azure cloud.

View solution in original post

1 REPLY 1
josef78
Memorable Member
Memorable Member

Your PDF's are stored in DB as blob?

 

I think, there no built-in Power BI function to render PDF.

 

You can try (re)develop custom visual as PDF viewer, with Save as option.

 

But much more easily, you can develop very simple web aspx page, which will serve document based on URL link (with some Id or token) from connected DB. But for it you will need some IIS server (or another technology), which you can host on Azure cloud.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.