Field element |
Docentric Toolkit Help
Send Feedback |
The Field element is the most basic tagging element used as a placeholder for values on a report template. It is a bindable element which means that when it is placed on a template, it can also be bound to data. The Field element will simply be replaced with the value it is bound to when the report enginine will process it.
This element has several properties that can be set in the Property Grid:
- Name: Name of the element. You will only want to set the name when this is an unbound Field element. The name of an element provides a means of referencing an element from code when setting the value manually for it programmatically.
- Bound: If checked, this element is a bound element which means the value will be provided in code.
- Value: This must be a valid binding. The value this element is bound to will replace the element at report generation time. (the concept of Binding is discussed here).
- Format String: Used for formatting the values of certain types like numbers and DateTime. The value of this property can be set to the valid .NET format string.
The Field element can be bound to values of any .NET type or node of an XML document. In case of binding to a .NET type it can be any simple .NET type (string, number types, DateTime, ...), but also a more complex type. In case of a non-simple type the "ToString" method will be called to obtain the string that will replace the element.
Formatting values
You can input a valid format strings manually into the "Format String" field. But instead, you can also use the "Format String Form" to choose from the most common format strings for different data types. To show the "Format String Form" click the "..." button next to the "Format String" field.