Report distribute

Trying to print a report using a USB printer attached to the gateway PC.

As I understand, thereport.executeAndDistribute should perform this exact job with print as action, however nothing happens. Using the .print() on the report viewer successfully prints to the printer if used on a client on the gateway PC.

My script looks as

rv = self.getReportViewer()

parameters = {'TestId' : rv.TestId}

actionSettings = {'primaryPrinterName' : "HP DeskJet 1110 Series",
					  'copies' : 1}

system.report.executeAndDistribute(path=rv.reportPath,
								   project='Damper',
								   parameters=parameters,
								   action='print',
								   actionSettings = actionSettings)

Any thoughts anyone?

Just some general comments on printing and reports. As you know, executeAndDistribute happens on the Gateway machine. This means that the printer needs to be visible to the Gateway computer (which it is, in your case), and the user that owns the Ignition service needs to be able to print to the printer. This last bit is usually where I see printing problems like you’re describing – the computer user who is running the client has access to the printer, but the computer user associated with the gateway does not.

Thank you Kathy,

So how would one force reports to print to this USB printer? I need to print all on this exact printer regarless of the client starting the print jobs location location.

You’ll need to make sure any user on your network that could possible want to print can see the printer, has permission to print to it, and has the printer set up on their machine. (I’m going to guess consistent naming will be important too?) This is pretty much an IT config issue, not an Ignition issue.

Sounds like a lot of work and is not really suitable for us as we are building machines sold as a 'plug and play’ish solution.

However, I did find a workaround with the system.util.sendMessage command filtering on hostname and IP address. The only requirement is that a client is running on the gateway computer. The client message script would then distribute and print the report.