Hi, when i try to print one report i get this error…
Error:
Traceback (most recent call last):
File "<event:actionPerformed>", line 1, in <module>
File "<module:shared.report.difetti>", line 5, in printReportDifetti
NameError: global name 'event' is not defined
Ignition v7.9.4 (b2017082911)
Java: Oracle Corporation 1.8.0_151
I put this code in Global -> Script Library [shared] -> report -> Difetti
Code:
def printReportDifetti(id_roll, report):
report = event.source.parent.getComponent("reportDifetti1")
report.print()
And i try to call the function with Button:
Code:
shared.report.difetti.printReportDifetti("2", "s2355/reportDifetti")