Note: The following information is for a trained report administrator who is familiar with the CRM data model.
Customizing label printing for report administrators
If Single report in the template, or the Series flag in the letter, is not set, all recipients are exported to a CSV file. For this, the system searches in the loader at the second level for a RECIPIENT or RECIPIENTS DTO. For each recipient, a row is created in the CSV file. Then the data below the recipient DTO is copied on the data of the first row, so that afterward the row differs only with respect to recipient data.
The name of the main DTOs and that of the recipient DTO can be provided through the report call parameter TOP_DTO or REC_DTO.
With SER_TYP, MainDocumentType can be set, e.g., 0 for wdFormLetters (standard) or 3 for wdCatalog.
Adaptation options for the catalog function
The catalog function repeats the visible text of the template (usually a table) for every record. Between the records, no section change or page break is inserted.
In the meta data of the template
For the template, enter the following parameters, separated by a space character:
SER_TYP: = 3 activates the catalog function.
TOP_DTO:=<EXTERNAL NAME> The name of the relevant top class (is suppressed with field name generation).
REC_DTO:=<EXTERNAL NAME> The name of the class that provides the records.
Example: SER_TYP:=3 TOP_DTO:=CHARACTER REC_DTO:=RECIPIENT
In the template itself
- Insert attributes from the top class in the header or footer:
At the end of the main data area, a list of commands each of which assigns a formatted mail merge field to a text label (somewhere in the main data area), e.g.,{SET KEY WORD {KEY WORD MERGEFIELD }}
To output the contents of the text label in the header or footer, e.g.,{REF KEYWORD}
- To output date fields formatted:
Enter the format string for Excel and Word in the loader, which outputs the date in client time for MS Office: D:%Y/%m/%d
Assign the formatted data to the text label in the document, e.g., in English:{SET START_DATE {MERGEFIELD START_DATE \ "MMM d, yyyy"}}
In the pattern, use non-breaking spaces only.
- To group data:
Sort the data in the loader.
The following expression outputs the company name only if the record number is 1, or if the current company name does not match the previous one. After checking, the previous name is assigned to theCOMPANYtext label.{IF " {=OR ({COMPARE {MERGESEQ}="1"}; {COMPARE {REF COMPANY}<>{MERGEFIELD CONTACTS_COMPANY_NAME}})} "="1" "{MERGEFIELD CONTACTS_COMPANY_NAME}" ""}{SET COMPANY {MERGEFIELD CONTACTS_COMPANY_NAME}}
- Labels and badges:
In the main data area, the {NEXT} field function moves to the next record.{SKIPIF <comparison>}skips the record conditionally.
In the resulting document, text labels disappear.SET,IF,OR,COMPARE,MERGESEQ,MERGEFIELD,NEXT, etc., are resolved.
Only page numbers are preserved as field functions.