I am new to perspective and ignition. I am facing problem with saving report on button click. I tried all the different ways given in forum and YouTube. I created a report named “ExpenseReport” and a view with pdf viewer and a button and in button onclick event I wrote the following code:
executeAndDistribute will save the report on the gateway machine.
If you want to download the report locally on whatever Perspective session you’re using, you need two functions - system.report.execute and system.perspective.download. system.report.execute can return the binary data that constitutes your report, in whatever format you specify - then system.perspective.download allows you to send that data to the front-end and actually download a local file.
@ptchanchal, In the upcoming 8.0.9 release, you'll also have a Report Viewer component that provides downloading/printing of reports in addition to the embedded report that you can interact with in a client session. It's available now in a nightly release if you'd like to play around with it.