Professional > Table scripting > Working with profile tables > Creating profile tables > Limiting the number of rows displayed
 
Limiting the number of rows displayed
You may want to limit the number of rows displayed in a profile table to an arbitrary maximum value. By default, the maximum number of rows displayed is 10,000. To change this, use the MaxRows property. This script restricts the table above to show only the first five rows:
Set Table = TableDoc.Tables.AddNewProfile("Table5",   "profile({housetype, numrooms, pets})",
  "House type and number of rooms of pet owners, first five")
  Table.Filters.AddNew("WithPets", "pets > 0",
    "Has one or more pets")
Table.Properties["MaxRows"] = 5
To display all rows, set MaxRows to -1.
See also
Creating profile tables