# Printing Report Data Missing

**URL:** <https://forum.inductiveautomation.com/t/printing-report-data-missing/22187>\
**Category:** Ignition\
**Created:** [January 29, 2019, 2:13pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187 "2019-01-29T14:13:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [January 29, 2019, 2:13pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/1 "2019-01-29T14:13:22Z")

</div>

Ignition 7.8.3

Window has a report viewer and “print” button. The print button fills in some of the properties on the report then uses the “.print()” method to print the report. Most (perhaps all) of the time, the report data generated from the properties does not show up on the report.

I must be missing something pretty simple… What is it?

Thanks,  
Mack

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 29, 2019, 2:19pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/2 "2019-01-29T14:19:02Z")

</div>

The .print() method on the report viewer doesn’t wait for the content to update – it prints whatever you have at that instant. And since property assignment is in the foreground, the viewer can’t act on your assignments until after your event method completes. Use system.util.invokeLater() to call the .print() method a second or so later.

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [January 29, 2019, 2:41pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/3 "2019-01-29T14:41:20Z")

</div>

Thanks Phil.

I tried wrapping the print statement in invokeLater, but did not have a delay…Would it make sense to watch .isValid during the delay?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 29, 2019, 3:37pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/4 "2019-01-29T15:37:31Z")

</div>

> [@mcgheeiv](#):
>
> Would it make sense to watch .isValid during the delay?

I never needed to. But it might be helpful if you try for short delays. Be sure not to sleep -- just re-invoke with another delay if not valid.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 29, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/5 "2019-01-29T15:52:32Z")

</div>

Would it be easier to use system.report.ExecuteAndDistribute(). This would ensure that the report data is updated when you feed it the parameters.

```auto
	system.report.executeAndDistribute(path=report, 
	project='ProjectName',
	parameters = params,
	action='print', 
	actionSettings = {'primaryPrinterName':PrinterName,
	'copies':1})

```

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [January 29, 2019, 4:09pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/6 "2019-01-29T16:09:06Z")

</div>

It would be, except the printers are not available from the gateway…

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [July 25, 2023, 3:11pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/7 "2023-07-25T15:11:23Z")

</div>

Hi There,

I am having the same issues even with the system.report.executeAndDistribute().

This is what I see in report viewer,

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

but when I print PDF,

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

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [July 25, 2023, 7:33pm UTC](https://forum.inductiveautomation.com/t/printing-report-data-missing/22187/8 "2023-07-25T19:33:58Z")

</div>

Confirm you are passing in the correct/expected report parameters in your call to `system.report.executeAndDistribute()`, and that the data you are passing in is in expected format/contains expected data.
