Syntax of Rtf Report Templates

Administration ›› Report Templates ›› Legacy ››
Parent Previous Next

The Syntax of the Collection Section

The Collection Section is the section that will be merged with all the elements of the Collection.

 

The syntax :

{{Collection CollectionName}}

{{ CollectionName["Path"]}} {{ CollectionName ["Path"]}}

{{EndCollection}}

 

The Collection Section, always must start with the {{Collection CollectionName}} and ends with the {{EndCollection}}, the CollectionName specifying the Collection to which this section will be linked. A Collection Section can contain rich text and Merge Fields.

 

If the Collection Section must display a fixed count of item, this can be forced by the following syntax: {{Collection CollectionName,ForceItemCount}} , where ForceItemCount is the needed count of elements in the section.

 

Examples:

{{Collection Contacts}}

{{Contacts["DisplayName"]}}{{Contacts["EmailAddress"]}} {{EndCollection}}

 

{{Collection Tasks}}

{{Tasks["Subject"]}}

- {{Tasks["ContentID.SearchableText"]}}{{EndCollection}}

 


The Syntax of the SubCollection Section

The SubCollection Section is a special Collection Section inside a Collection Section, that is additionally filtered with values from the main Collection.

 

The syntax :

{{Collection CollectionName}}

{{ CollectionName["Path"]}} {{ CollectionName ["Path"]}}

...

{{SubCollection SubCollectionName,SubCollectionName ["Path1"] = CollectionName ["Path2"]}}

{{EndSubCollection}}

...

{{EndCollection}}

 

The SubCollection Section, always must start with the {{SubCollection SubCollectionName}} and ends with the {{EndSubCollection}}, the SubCollectionName specifying the Collection to which this section will be linked. A SubCollection Section can contain rich text and Merge Fields.

 

If the SubCollection Section must display a fixed count of item, this can be forced by the following syntax: {{SubCollection SubCollectionName,ForceItemCount,... where ForceItemCount is the needed count of elements in the section.

 

Example:

{{Collection Users}}

{{Users ["Name"]}}

{{SubCollection Tasks,Users["ID"] = Tasks["OwnerID"]}}

-{{Tasks["Subject"]}} {{EndSubCollection}}

{{EndCollection}}

 

The Syntax of the GroupBy Section

A GroupBy Section is the section that groups together elements of the Collection that have the same value for the specified grouping path.

 

The syntax :

{{Collection CollectionName}}

{{ CollectionName["Path"]}} {{ CollectionName["Path"]}}

...

{{GroupBy CollectionName["GroupByPath"]}} ...

{{EndGroupBy}}

...

{{EndCollection}}

 

The GroupBy Section, always must start with the {{GroupBy CollectionName["GroupByPath"]}} text and ends with the {{EndGroupBy}}, the GroupByPath specifying the field on which the Collection items will be grouped. A GroupBy Section can contain rich text and merge fields.

 

Example:

{{Collection Tasks}}{{GroupBy Tasks["OwnerID"]}}

{{Tasks["OwnerID.Name"]}}{{EndGroupBy}}

- {{Tasks["Subject"]}}{{EndCollection}}

 

The Syntax of Merge Fields

The Merge Field if the part of the Merge Section that is merged with values corresponding to the Merge Field's path.

 

The syntax:

... {{CollectionName["Path"]}} ...

 

String Formating

Merge Fields of type string, can be specially formated, by specifying their length and alignement.

 

The syntax:

... {{CollectionName["Path,alignment"]}} ...

The optional alignment component is a signed integer indicating the preferred formatted field width. If the value of alignment is less than the length of the formatted string, alignment is ignored and the length of the formatted string is used as the field width. The formatted data in the field is right-aligned if alignment is positive, and left-aligned if alignment is negative.

 

Date and Time Formating

Merge Fields of type Date or Time, can be also specially formated.

 

The syntax:

... {{CollectionName["Path,format"]}}...

where format can have the following values:

d - Short date pattern

D - Long date pattern

t - Short time pattern

T - Long time pattern

f - Full date/time pattern (short time)

F - Full date/time pattern (long time)

M or m - Month day pattern

Y or y - Year month pattern

 

For greater control over the formating of Date and Time, custom formats can be used. Custom formats are the combination of one or more custom format specifiers.

Custom format specifiers:

d - Displays the current day of the month, measured as a number between 1 and 31, inclusive.

dd - Displays the current day of the month, measured as a number between 1 and 31, inclusive. If the day is a single digit only (1-9), it is formatted with a preceding 0 (01-09).

ddd - Displays the abbreviated name of the day.

dddd - Displays the full name of the day.

h - Displays the hour in the range 1-12.

hh - Displays the hour in the range 1-12. If the hour is a single digit (1-9), it is formatted with a preceding 0 (01-09).

m - Displays the minute in the range 0-59.

mm - Displays the minute in the range 0-59. The minute represents whole minutes passed since the last hour. If the minute is a single digit (0-9), it is formatted with a preceding 0 (01-09).

M - Displays the month, measured as a number between 1 and 12, inclusive.

MM - Displays the month, measured as a number between 1 and 12, inclusive. If the month is a single digit (1-9), it is formatted with a preceding 0 (01-09).

MMM - Displays the abbreviated name of the month.

MMMM - Displays the full name of the month.

s - Displays the seconds in the range 0-59.

ss - Displays the seconds in the range 0-59. The second represents whole seconds passed since the last minute. If the second is a single digit (0-9), it is formatted with a preceding 0 (01-09).

t - Displays the first character of the A.M./P.M. designator.

y - Displays the year as a maximum two-digit number.

yy - Displays the year as a maximum two-digit number. The first two digits of the year are omitted. If the year is a single digit (1-9), it is formatted with a preceding 0 (01-09).

yyyy - Displays the year including the century. If the year is less than four digits in length, then preceding zeros are appended as necessary to make the displayed year four digits long.

: - Time separator.

/ - Date separator.

 

Image Formating

Merge Fields of type blob, that contain images, can be merged as images into the report.

 

The syntax:

... {{CollectionName["Path,Image"]}}... or,

... {{CollectionName["Path,Image( width)"]}}... or,

... {{CollectionName["Path,Image( width, height )"]}}...

 

Text Formating

Merge Fields of type blob, that contain plain text, can be merged as plain text into the report.

 

The syntax:

... {{CollectionName["Path,Text"]}}...

 

Rtf Formating

Merge Fields of type blob, that contain Rtf text, can be merged as rich text into the report.

 

The syntax:

... {{CollectionName["Path,Rtf"]}}...