# Printing from Report-module, offset

**URL:** <https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [July 8, 2021, 1:34pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611 "2021-07-08T13:34:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [July 8, 2021, 1:34pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/1 "2021-07-08T13:34:31Z")

</div>

Hi all,

We have system printing to a label printer, using Vision and container print. This works great.

 ![container](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db10d9cf6c77047d06e60337d74e560c18be498d.jpeg)

Now we are looking into printing from the gateway (external input trigger) so I have created a report and using the executeAndDistribute command to start the print job. But what ever I do I’m not able to make it fit the label. As the container print job is spot on I cannot set any offsets on the printer.

Any ideas on how to tweak this to success?

 ![event_script](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c04c7c97517cad8fc0d7cb704de102fe296d1fb5.jpeg)

 ![report](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a7089bd8eed8043c2765d3a1babd97de6e76c3d8.jpeg)

 ![20210708_152744](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/9/d92100dfde37ef383673da5b137794ee243ff44e.jpeg)

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 8, 2021, 2:15pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/2 "2021-07-08T14:15:09Z")

</div>

In my experience this is a printer driver problem, not an Ignition problem. I print to a lot of Datamax printers and the issue is that the printer driver needs to have a matching label stock setting that matches the report size (and orientation) or else it doesn’t know what to do with it and will seemingly randomly pick a stock size setting. I would check that first.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/268773c2c56219303ef31034bf0bf9fed12f95ea.png)

---

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [July 9, 2021, 6:28am UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/3 "2021-07-09T06:28:23Z")

</div>

It’s all set up correct. Printing Containers (also Ignition) works flawless. 🤷‍♂️

 ![sato](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e9b0bb25fd560f5672a665788eae39704de8ef85.jpeg)

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 9, 2021, 12:22pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/4 "2021-07-09T12:22:18Z")

</div>

Interesting. I print to SATO printers as well without issue. I don’t specify orientation in the function though, maybe that has something to do with it? That looks like the only difference. Here’s what I do:

```auto
settings = {"primaryPrinterName":printerName}
	def printing(set=settings, RN=reportName, prodN=prodNum):
		logger = system.util.getLogger("Printing Report")
		import time
		start = time.time()
		system.report.executeAndDistribute(path=RN, project="ExportLabels", parameters={"ProductCode":prodN}, action="print", actionSettings=set)
		stop = time.time()
		logger.infof("Time to execute and print report: %s seconds", str(stop-start))
	system.util.invokeAsynchronous(printing)

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e1b858d85cfb037dc3889337c7cd5e794a8df3d.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2a7dfe14601123c49a2464860cbdd2630d7ea719.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c124d5cd42fcea029a44f3640f27788160592575.png)

---

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [July 9, 2021, 1:30pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/5 "2021-07-09T13:30:33Z")

</div>

My setup is landscape, and believe I need it. I think I have tried every combination possible now. 😅

useAutoLandscape\* defaults to true. If _useAutoLandscape_ is false, _pageOrientation_ , which can have values of “portrait” or “landscape” ( **default is “portrait”** ), is used.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [July 9, 2021, 1:45pm UTC](https://forum.inductiveautomation.com/t/printing-from-report-module-offset/48611/6 "2021-07-09T13:45:30Z")

</div>

Maybe try setting the roll on the report settings to 90 and print in portrait?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e8ba4b9da06ad62a462eec8e3339df78aca3013a.png)
