Exago .NET API Documentation
KeyColumn Class
Members  Example 
WebReports.Api.Reports Namespace : KeyColumn Class

This object represents a unique key field in an Entity (Data Object). Unique key fields are columns that uniquely identify a record in an Entity (Data Object). Each entity requires at least one Key Column.

KeyColumn objects are also used when constructing Joins between Entities (Data Objects).

public class KeyColumn : WebReports.Api.Common.WrProtectedObject 
Add the column "ID" as a Unique Field to the data object myNewEntity.
myNewEntity.KeyColumns.Add(new KeyColumn(myNewEntity.GetColumn("ID").ActualFullName));
Entity fromEntity = api.Entities.GetEntity("campaigns");
Entity toEntity = api.Entities.GetEntity("Donations");

Join newJoin = new Join()
	EntityFromName = fromEntity.Name,
	EntityToName = toEntity.Name,
	Type = JoinType.LeftOuter,
	RelationType = 1,
	Weight = 0

newJoin.JoinColumns.Add(new JoinColumn(new KeyColumn(fromEntity.Name, fromEntity.GetColumn("ID").Name), new KeyColumn(toEntity.Name, toEntity.GetColumn("Campaign").Name)));
Inheritance Hierarchy


See Also


KeyColumn Members
WebReports.Api.Reports Namespace