Generating a report from window components

  1. Create a new parameter in the report with type Dataset:

  2. Create a script data source in the report and manipulate the datasource however you want. Here I’m just passing the parameter through:

  3. Do something in the report with the new data source:

  4. Add script to button:

params = {"DatasetParameter": event.source.parent.getComponent('Power Table').data}
settings = {"path":"C:\\Ignition Reports", "fileName":"Report.pdf", "format":"pdf"}
system.report.executeAndDistribute("myReport", "myProject", parameters=params, action="save", actionSettings=settings)

1 Like