How to trigger report generation from the button?

Hi All
I have vision screen with power table and the pie chart. I need to have functionality to trigger generation of report using a simple button which saves data from the table but not pie chart in excel or pdf format The vision screen works as required but report is a problem for me :frowning:

  1. Could you please help me to find a way to trigger report from the button on vision screen?
  2. Do i have to place report viewer on the vision window if its not needed to be able to trigger report generation ?

You do not need a report viewer component on a vision window to trigger report generation.

What you need is system.report.executeAndDistribute - Ignition User Manual 8.0 - Ignition Documentation

This allows you to programmatically call the gateway to make a report. You can put this script on a button.

This would also require you to make a template Report though so you need to do that first. This is all for exporting to PDF. To create PDF’s require the report module.

To export to Excel, you you can use system.dataset.exportExcel - Ignition User Manual 8.0 - Ignition Documentation

1 Like

both suggestions are excellent!
that’s exactly what i needed - thank you very much!

1 Like