The template properties are defined along with template fields in round braces ( ) as can be seen in the below image:
The cell context property defines the relationship between cells depending on which the cells are grouped or filtered.
Value: Cell location or Data field
Custom: Cell context must be specified explicitly.
Default (default value): The adjacent cell on the left with E=V, or the adjacent cell on the top with E= H.
None: The cell has no context.
Example
{{ds.field(C=A1, E=H)}}
Hello World! {{(C=A2)}}
{{=SUM(F4) (C=ds1.team)}}
{{=SUM(ds1.score) (C=ds1.team*ds1.season)}}
For more information about Cell Context, refer Cell Context topic.
The cell expansion property describes the direction in which the cell values will expand.
Value: Enum
E=N (None)
E=H (Horizontal): Cell data is expanded from left to right.
E=V (Vertical-Default value): Cell data is expanded from top to bottom.
Example
{{ds.field(C=A1, E=H)}}
For more information about Cell Expansion, refer Cell Expansion topic.
The group property allows you to group data in template.
Value: Enum
G=Normal: The group by field(s) value is not repeated for the corresponding records in the column; instead they are printed once per data group.
G=Merge (default value): The same behavior as for the normal parameter, except that it merges the cells in the group by field(s) for each group set.
G=Repeat: The group by field(s) value is repeated for the corresponding records.
G=List: The field(s) values are listed independently for the corresponding records.
Example
{{ds.field(G=repeat)}}
{{ds.field(G=list)}}
The below image shows how to apply 'merge' grouping on repeating data:
The range property specifies the fallback context for the fields in specified range. All the fields that are covered in the range which have no default nor explicit context, use the current cell in which the range is defined, as their context.
Value: Cell range
Default value: Null
Example
{{ds.field(R= B3:F10)}}
The below image shows that the range is defined for a student name, specifying that the details will expand and group with respect to Student name:
The sort property specifies the type of sorting in template.
Value: Enum
S=Asc (default value): Ascending
S=Desc : Descending
S=None: None
Example
{{ds.field(S=Desc)}}
The below image shows how the template fields are expanded based on their sorting type:
The page break property specifies whether to add a new page after a field or not.
Value: Boolean
Pagebreak=True
Pagebreak=False (Default value)
Example
{{ds.field(Pagebreak=true)}}
The below image shows that a page break will be added after 'Occupation' field:
Note: In pagination mode, the Pagebreak template property is ignored.
The image property specifies whether to add an image or not and if yes, its height and width can also be specified.
The supported image data type is byte[] and base64 string.
The position of image in the cell can be controlled by setting the horizontal and vertical alignment style of cell. By default, the image is located in the center of the cell horizontally and vertically, both.
Value: Boolean
Image = True
Image= False (Default value)
Image.width=String value: Default value is cell width.
Image.height=String value: Default value is cell height.
Example
{{ds.icon(Image=true)}}
{{ds.icon(Image=true, Image.width=150px)}}
{{ds.icon(Image=true, Image.height=150px)}}
The below image shows how an image can be added in the Excel report: