How to print report to network printer

I had a report being printed from the system.report.executeAndDistribute function which printed to a local printer. Below is the example code which worked for this local printer:

		settings = {'primaryPrinterName': 'HP LaserJet M608 [847294]', 'backupPrinterName': 'none', 'copies': 1, 'printBothSides': True,
					'collate': True, 'useRaster': False, 'rasterDPI': 1200, 'useAutoLandscape': False, 'pageOrientation': 'portrait'}
		system.report.executeAndDistribute(path='FurnaceCycle', parameters=params, action='print', actionSettings=settings)

They now want to print to a network printer. I was given the printer path of
\puscgp03\gacoai293512p.

How would the code above change now that its not a local printer but a network printer? I am assuming that I can’t put the path above in place of the primary printer name

Add the printer on the Ignition Gateway (where Ignition Software is hosted). Then you can call it out by printer name since reports are executed and distributed on the gateway not the client.

By adding the printer on the Ignition Gateway (where Ignition Software is hosted), do you just mean on the actual computer running this gateway to add the printer, then once added use the printer name shown through windows? Pretty sure this is what you mean but wanted to clarify

Yes, on the computer that the Ignition gateway is installed on. Just install it like you would on any computer, then when you run your script, just use the name that you installed the printer under.

1 Like

Thanks! Thats what I thought but wanted to confirm

1 Like