How can I print, or get a print preview?

My only experience has been with the print function for tables and it works well.
Give the manual a look at the following link…


While tables have their own printing routine (to handle multiple pages) as suggested above, you can also perform a more basic print of an entire window or part of a window.

For instance, to make a print window button, the code would look like this:

window = fpmi.gui.getParentWindow(event) printJob = fpmi.print.createPrintJob(window) printJob.print()

For more on the fpmi.print module, see the appropriate documentation section under Technical Reference > Jython > Built-in Modules (fpmi.*)

For more sophisticated printing, including print preview, I suggest the FactoryPMI Reporting Plugin. If you post back with more specifics about your printing requirements, we can help you further.

Hope this helps,

How about printing in the reporting plug-in? Besides right-clicking on the report, how can I add a button to print the report?

The report viewer component has a .print() function. So, a print button’s script would look something like this:

report = event.source.parent.getComponent("Report Viewer") report.print()

Hope this helps,