Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
LINQ Reporting Engine enables you to access a data associated with a particular DataTable row instance in template expressions using the “.” operator. The following table describes, which identifiers you can use to access different kinds of the data.
| Data Kind | Identifier | Examples of Template Expressions |
|---|---|---|
| Field Value | Field name | Given that r is a row that has a field named “Name”, you can access the field’s value using the following syntax. |
| Single Parent or Child Row | Parent (child) table name | Given that r is a row of a DataTable that has a parent (child) DataTable named “City”, you can access the single parent (child) row of r using the following syntax.Given that the “City” DataTable has a field named “Name”, you can access the field’s value for the single parent (child) row using the following syntax. |
| Enumeration of Child or Parent Rows | Child (parent) table name | Given that r is a row of a DataTable that has a child (parent) DataTable named “Persons”, you can access the enumeration of the child (parent) rows of r using the following syntax.Given that the “Persons” DataTable has a field named “Age”, you can count the child (parent) rows that correspond to persons over thirty years old using the following syntax. |
Note – Field and table names are case‑insensitive.
To determine parent‑child relationships for a particular DataTable instance, the engine uses DataRelation objects contained within the corresponding DataSet instance. Thus, you can manage these relationships in a common way.
Note – Instead of using of table names to access data of child or parent rows, you can also use relation names, which is useful when you deal with multiple relations to the same table.
Q: How do I read a field value from the current DataTable row in a template?
A: Use the row identifier followed by a dot and the field name, e.g., r.Name. The identifier (r) represents the current row object, and the expression returns the value of the Name column for that row.
Q: How can I obtain a related parent row from the current row?
A: Reference the parent table name as a property of the row, for example r.City. This returns the single parent row. You can then chain another field name, such as r.City.Name, to read a column from the parent row.
Q: What is the syntax for iterating over child rows of the current row?
A: Use the child table name, e.g., r.Persons. This yields a collection of child rows that you can apply LINQ methods to, such as r.Persons.Count(p => p.Age > 30) or r.Persons.Sum(p => p.Salary).
Q: Are table and field identifiers case‑sensitive in template expressions?
A: No. Identifiers are case‑insensitive, so r.Name, r.name, or r.NaMe all refer to the same column.
Q: When a DataSet contains multiple relations to the same table, how can I specify which relation to use?
A: Use the relation name defined in the DataSet instead of the table name, e.g., r.RelationName. This disambiguates the relationship when several exist between the same pair of tables.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.