Add a table to the report.


addTable( table, caption = None, justify = None,
                   ref = None, colsWidths = None, border = True )


table (list)
A two dimensional list containing the table rows and columns data.
caption (string)
Caption of the table.
justify (string)
Table justification. Valid values are flushleft, flushright and center.
ref (string)
Label of the table for reference.
colsWidths (list)
List of column widths in centimeter.
border (boolean)
If True draw table borders.

Return Value



This routine adds a table to the report. The table contents, caption, justification, reference and columns width are given by table, caption, justify, ref and colsWidths. If border is True the table borders will be drawn. For example,
presId = -1
massId = -1
for i in range( nOsiVars ):
    name = adb.get( "osiVarName", i )
    if name == "pressure": presId = i
    if name == "mass_flux": massId = i
nOsfs = adb.get( "nOsfs" )
inletId = -1
for i in range(nOsfs):
    name = adb.get( "osfName", i )
    if name == "inflow": inletId = i
pres = adb.get( "osiValues", inletId, presId )
mass = adb.get( "osiValues", inletId, massId )
mpData= [ ("Pressure Drop (Pa)", "Mass Flux (Kg/sec)" ) ]
for i in range(len(pres)):
    mpData.append( ("%.2f" % pres[i], "%.2f" % mass[i]) )
rep.addTable( mpData, "Fan performance", "center", "tab:mp" )