I am using V7.8.2 and need help with the script function system.report.executeAndDistribute().
Customer wants to select query parameters for reports, then print to a PDF. I can create the PDF from help examples, just don’t know how to pass custom parameters to the report to reflect the selected query parameters
[attachment=0]2016-08-05 11_19_38-.png[/attachment]
Pass the report’s named parameters using their names in a Python dictionary, see this link for an example of the syntax you’d need:
docs.inductiveautomation.com/di … cuteReport
[quote=“PGriffith”]Pass the report’s named parameters using their names in a Python dictionary, see this link for an example of the syntax you’d need:
docs.inductiveautomation.com/di … cuteReport[/quote]
Thanks,
saw that , was hoping there would be an easier way.
What is missing from report viewer is the ability to print.
Actually - the functionality is there, just not documented as well as it could be. If you right-click a report viewer component in Preview Mode, or while in a client, you can use the Print option in the dropdown.
You can call this from scripting with something like this (in an example button’s actionPerformed scripting hook):
system.gui.getSibling(event, 'Report Viewer').print()
[quote=“PGriffith”]Actually - the functionality is there, just not documented as well as it could be. If you right-click a report viewer component in Preview Mode, or while in a client, you can use the Print option in the dropdown.
You can call this from scripting with something like this (in an example button’s actionPerformed scripting hook):
system.gui.getSibling(event, 'Report Viewer').print()
Perfect,
that is exactly what I was looking for, thanks