General structure

A template is very similar to the resulting visit report. It contains the layout, text and images which should be displayed on the visit reports.

The actual visit report will be filled with values which are specific to each visit report. These values can be:

  • Data of the visit. For example, the service order code and the various amounts of hours and materials used and the starting time of the visit.
  • Labels. Text labels can be used if the text on the visit report is language dependent. The default language for the report is set to the language of the Sold-to Business Partner, or, if this is not defined in LN, the language as set in the Data Display Settings of the application. In the default templates no texts are used. Only labels are used, so these reports can be printed in every language supported by LN. When translation is not required, regular text can be used, and label place holders can be omitted.
  • The signatures of the service engineer and customer. In Mobile Service both the engineer and customer can sign the visit report before finalizing it. These signatures can be added as images in the actual visit report.

In the template these values are represented by placeholders. When creating the actual visit report these placeholders are replaced by the data, labels, and signatures of the actual visit.

Besides document data, represented only once on a visit report, each visit can contain multiple activities and each activity can contain multiple labor costs, inspections, material costs, other costs, and notes. Therefore, in addition to placeholders, visit report templates contain data sets. Data sets within the template are sections which can be repeated for every occurrence of the data in the visit.

Placeholders

Placeholders are defined by using text within markers. The markers around the placeholders determine how data is displayed. There are several types of placeholders, each identified by different markers. The first three placeholders are for data, labels, and signatures. For example, the data placeholder for the service order number is ##ServiceOrder##.

There are additional placeholders to define a data set section.

Data sets

The report data consists of several data sets. The template must be composed in such a way that corresponds with these data sets. A visit report has eight data sets.

  • Document data
  • Activity data
  • Material cost data, with a reference to Activity data
  • Labor cost, with a reference to Activity data
  • Other cost, with a reference to Activity data
  • Inspections, with a reference to Activity data
  • External Notes, with a reference to Activity data (available with solution 2131466)
  • Total Hours per Labor Type

Data sets can hold any type of information such as text or images.

Although materials, labor and other cost are linked to an activity, it is possible to show a single list of all the costs of all the activities of the visit.

Document data set

This data set holds information about the visit and is available over the whole document. This set also contains images. The signature placeholders are the only supported image placeholders.

Activity data set

The activity data set identifier is ‘Activities’. This data set holds data for the activities which are selected by the user when generating the report.

Material cost data set

The material cost identifier is ‘MaterialCost’. This data set holds data of all material cost. These are the costs entered in the Material screen. The display of material cost of one or more activities is based on how the material cost is defined in the template.

Labor cost data set

The labor cost identifier is ‘LaborCost’. This data set holds data of all labor cost. These are the costs entered in the Task screen. The display of labor cost of one or more activities is based on how the labor cost is defined in the template.

Other cost data set

The other cost identifier is ‘OtherCost’. This data set holds data of all other cost. These are the costs entered in the Travel Time and Other Cost screen. Data for both Travel Time and Other Cost are displayed here. The display of other cost of one or more activities is based on how the other cost is defined in the template.

Inspections data set

The Inspections identifier is ‘Inspections’. This data set holds the data of all inspections of an activity. These are the inspections specified in the Inspections screen.

External Notes data set

The External Notes identifier is ‘ExternalNotes’. This data set holds the data of all the external notes of an activity.

Total Hours per Labor Type data set

The Total Hours per Labor Type identifier is ‘TotalHoursPerLaborType’. This data set holds the information about the total hours spent per labor type. It must be used on the document level.

Fixed price

The LN backend supports the fixed price per activity functionality. The report supports fixed price in a basic manner. The fixed price is not a data value which can be placed in the template, but it is represented in the total.

Prices are calculated in the LN backend. These prices are synchronized to the app. If an activity has a fixed price, all individual costs are set to zero. In this way the totals and the grand total would always be zero. The report replaces the totals with the fixed price amount.

In case cost is not calculated as zero, these costs are added to the fixed price amount.