DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Show python list in table report

i Want to create a 2D Table report with a python list.

damdoum_0-1683103780807.png

i want to put the list name, num_Fail, num_passed in a 2D table with 3 columns.
is the any expression to call it in the table. 😊

0 Kudos
Message 1 of 2
(904 Views)

I usually create a channel and refer to it in the table but I like your idea too.  You can populate your list into a table in a dynamic manner:

 

 

a_list = list(range(10))
table = dd.Report.Sheets("Sheet 1").Objects("2DTable1")

for item in range(1, len(a_list)+1, 1):
    table.Columns.Item(1).TextList.Item(item).Text = str(a_list[item-1])

 

Assuming your table is sized and set properly.  You can also set table properties in script.

0 Kudos
Message 2 of 2
(883 Views)