# Script on Download button on Report Viewer in Perspective

**URL:** <https://forum.inductiveautomation.com/t/script-on-download-button-on-report-viewer-in-perspective/41862>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [December 30, 2020, 5:29pm UTC](https://forum.inductiveautomation.com/t/script-on-download-button-on-report-viewer-in-perspective/41862 "2020-12-30T17:29:56Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![awarunek187](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@awarunek187](https://forum.inductiveautomation.com/u/awarunek187)\
**Post date:** [December 30, 2020, 9:31pm UTC](https://forum.inductiveautomation.com/t/script-on-download-button-on-report-viewer-in-perspective/41862/8 "2020-12-30T21:31:27Z")

</div>

I saw it in this thread:

> [@Accessing PDF's from a Database Table in Perspective](http://forum.inductiveautomation.com/t/accessing-pdfs-from-a-database-table-in-perspective/25402):
>
> I know with Perspective, the PDF Viewer will only show PDF’s where there’s a web path because of how a web browser works. What I wanted to see is if there’s a way, and if so, what the best practice is to look at PDF’s, images, etc. that are stored in MSSQL database tables. Currently in Vision, we read in the bytes and use the .loadPDFBytes function. I know that doesn’t exist in Perspective, but is there a way to run a script on the Gateway to create the PDF, put it in a location, and then be …

I am able to send pdfs from the report viewer to my DB via a button. I can see the pdfs in the table that I created. I want to be able to display each PDF, in the PDF Viewer or Inline Frame, by just clicking on the row in the table. (This will act as a way to view past entries).

---

_[View the full topic](https://forum.inductiveautomation.com/t/script-on-download-button-on-report-viewer-in-perspective/41862)._
