Represents the Table Catalog. This object lists the database tables used when a Data Model is built.
This example shows how to create a Data Model by inserting tables from the Table Catalog. It also shows how to change the basic display properties of the Table Catalog:
with (ActiveDocument.Sections["Query"].DataModel) { Catalog.ShowFullName= true //Updates the Table Catalog with the most current view of the tables Catalog.Refresh() Table1 =Catalog.CatalogItems["WINE"] Table2 =Catalog.CatalogItems["WINE_SALES"] //Create two new topics from tables in Table Catalog Topics.Add(Table1) Topics.Add(Table2) }
This example shows how to list available database tables:
This example shows how to add topics to a Data Model section:
CatItem = ActiveDocument.Sections["DataModel"].DataModel.Catalog.CatalogItems["PCW_ITEMS"] ActiveDocument.Sections["DataModel"].DataModel.Topics.Add(CatItem)
This example prints the names of databases for each table in the Table Catalog:
var TableCatalog = ActiveDocument.Sections["SalesQuery"].DataModel.Catalog var TableCount = ActiveDocument.TableCatalog.CatalogItems.Count for (j=1;j<=TableCount;j++) Console.Writeln (TableCatalog.CatalogItems[j].Name)
Read-write: Property ShowDerivableQueries as Boolean, Property ShowFullNames As Boolean, Property ShowLocalResults As Boolean