Printing report with a button

Just a little note on what nmudge suggested - not all (in fact, just a small fraction) of what dir() will return is readily usable or useful, and there will be no accompanying documentation.

You may want to search the User Manual by key word instead. There is a whole section on Reporting (the first page is here: https://www.inductiveautomation.com/support/usermanuals/ignition/index.html?reporting_introduction_overview.htm); there is also Appendix C for Scripting functions (check out system.print section)