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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.