' Name: Table.ReportInfo ' ' Title: Reports on a table's structure ' ' Topics: Tables ' ' Description: Working off a table document this script reports ' on the structure of the table ' ' Requires: The active document must be a table. ' ' Self: ' ' Returns: atbl=av.getactivedoc if(atbl.is(table).not) then msgbox.error("A table document must be active.","Error") exit end theVTab1 = atbl.getvtab theBitMap1 = theVTab1.GetSelection fList = theVTab1.GetFields atab=tab+tab+tab+tab totalchar = "Alias"+atab+"Type"+atab+"Width"+atab+"Decimal" totalchar=totalchar+nl+"---------------------------------------------------------------------" longname=0 for each afld in flist aname=afld.getalias if (aname.count > longname) then longname=aname.count end end for each subitem in flist aspace=" " itList = subitem.gettype itPrecision=subitem.getPrecision itwidth=subitem.getwidth aname=subitem.getalias compilation=aname+","+atab+itlist.asString+","+atab+itWidth.asString+"," +atab+itPrecision.asString totalchar=totalchar +nl+ compilation end MsgBox.report(totalchar, "Items from "+atbl.getname.asstring)