# Print Table ontents

**URL:** <https://forum.inductiveautomation.com/t/print-table-ontents/7802>\
**Category:** Ignition\
**Created:** [January 8, 2014, 12:50pm UTC](https://forum.inductiveautomation.com/t/print-table-ontents/7802 "2014-01-08T12:50:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish007pict](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ashish007pict](https://forum.inductiveautomation.com/u/ashish007pict)\
**Post date:** [January 8, 2014, 12:50pm UTC](https://forum.inductiveautomation.com/t/print-table-ontents/7802/1 "2014-01-08T12:50:45Z")

</div>

Hello All,

I am using table component to display the result of SQL Select query. I am getting all the values in Table on Ignition screen when I run application. What I am not able to do is that I am using table.print() funtion to get the hard copy of this table contents.

Below is my code.

[code]  
import system  
import app

window = system.gui.getWindow(“Current Details”)

table = window.rootContainer.getComponent(“Table”) # Get a reference to the table  
#table = event.source.parent.getComponent(“Table”) # Get a reference to the table  
#system.dataset.exportExcel("/home/pacrim\_xterm3/Documents/data.xls", 1 , table.data)  
table.print()[/code]

This code pops up the Printer Setting window for Printer selection and other Page Setup options.

When I click on Print button in this dialogue box, I just get EMPTY table printed on a paper.

I have attached screen shot of my table contents and my print operation output file.

Can somebody know how to do this?

Thanks  
Ashish

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 15, 2014, 10:52pm UTC](https://forum.inductiveautomation.com/t/print-table-ontents/7802/2 "2014-04-15T22:52:11Z")

</div>

Sorry for the late response, have you been able to get this to work?

I was able to print the contents of the table with this script

`table = event.source.parent.getComponent('Table')
table.print()`

It looks like you are using the same code. Just a note, I didn’t import anything. If you have not gotten this to work I would consider updating your printer driver. Since you are seeing the printer dialogue box that tells me Ignition is doing what it is supposed to do.
