Skip to content
Beta version of the new documentation. Go back to old version
Home Custom print forms Netgrif Report Connector

Netgrif Report Connector

Last updated

CDESK includes several predefined print reports that are applied in various modules. However, thanks to the NETGRIF connector, you are no longer limited to the predefined forms; you can create your own custom print reports for requests, fulfilments, work orders or asset management logs. Thanks to the high modularity of the NETGRIF tool, you can design a print report that will meet even very specific requirements, as it can include fields from requests, fulfilments and configuration items. Thanks to the NETGRIF connector, these forms can be imported into CDESK.

The configuration of a custom print report begins on the NETGRIF side, where the layout of the print report itself is configured. You then need to configure the workflow for that report. Finally, directly within the NETGRIF connector, the fields of the print report are paired with the fields of the selected CDESK module so that the required information is viewed in the print report fields. Detailed procedures for each step are described in this manual.

One of the most common uses of the NETGRIF connector is for service protocols, which a technician generates from a request in both the web interface and the phone app. The procedure for setting these up is described in the ‘Configuration of Service Protocols’ section of the documentation.

Configuring the template for a print report on the NETGRIF side

Access to the report template 

When creating your own custom print report, you need to start by designing it in NETGRIF. To do this, click on the following link. Once you have clicked on the link, the NETGRIF form configuration tool will appear.

Image: The NETGRIF tool before starting to configure a print report

On this page, you can create a print report from scratch or use pre-prepared templates as a starting point. To make things easier, we have prepared some templates for you, which you can download via the following link.

Once you have downloaded the files, upload them to the NETGRIF tool using the icon for uploading XML files. When you click on the icon, a file explorer will view a file from your computer.

Image: Icon for uploading XML files to NETGRIF

Once the file is uploaded, two square icons representing the form screen will appear in the form. Below these icons, the form to be designed is displayed. In the first step, right-click on the icon labelled t1 and select the option + Create new form.

Image: The "Create form" option under the icon labelled "t1"

Clicking this button displays a grid map. The number of columns in this grid determines how many fields can be placed side by side. The default value is 8, meaning that 8 different fields can be placed side by side. However, individual fields can span multiple columns. The number of columns can be changed using the “” field under “Number of Columns”. However, the number of columns in the grid does not determine the final width of the print report. The final width will always be the same, which is the width of an A4 page. The number of columns only determines how many fields can be placed side by side in the print report.

Image: Basic grid of the print report and field for changing the number of columns

Adding fields to a print report

To add any type of field, click on the Create new fields option, located on the left side. Menus for various field types will then appear. To add a text field, click on the “” option and then “Text”, and then select “” and “Simple”, which indicates a simple text field. After clicking, the text field is automatically placed in the upper-left corner of the grid, from where you can move it to any location within the grid. Alternatively, you can place the field directly at the desired location by grabbing it from the menu on the left side and using Drag & Drop to move it to the desired location.

Image: Adding a simple text box to the grid

You can resize the added field by dragging its edges. The size can be adjusted both horizontally and vertically. The maximum width of the field is determined by the number of columns in the grid. The maximum height of the field is not limited. You can move the field within the grid using the “” icon, which appears in the upper-right corner of the field. To delete the field, click the “” icon.

Image: Icons for deleting and moving a field

Configuring Field Properties in a Print Report

When you click on a field within the grid, the parameters for that field are viewed on the right-hand side of the window. These are the following settings:

  • Id – We recommend changing the default value so that you can later identify the field during pairing with CDESK fields, and also so that the field can be distinguished from the other fields in the grid. We recommend entering the name in lower case.
  • Behaviour – the following options are important for the CDESK print report:
    •  Editable – used for fields into which a value from CDESK will be entered.
    •  Visible – no value will be pre-filled in the field. These settings are applied if, for example, a logo or fixed text is to be viewed in the field.
  • Title – the field description that will be viewed in the print report
  • Description – a description of the field that is viewed in the grid when configuring the print report. The description is used to identify the field within the grid.
  • Initial value – enter the text to be viewed permanently in the field. This is used if the field has ‘Editable’ settings.
Image: Setting field properties

Add a subform

If a print report is to include multiple records from modules linked to the original module from which the print report is generated, a subform is used. This applies, for example, to cases where the print report is to contain a list of all CI items linked to a request, or a list of all fulfillments for a request. The subform is configured in the same way as the main form for the print report. Subsequently, in this form, you must add Task ref → Simpleto the location where the subform fields are to be displayed.

Image: Adding a subform to the main form

Add an image

If you want to insert your own logo or image into the form, follow these steps:

  • Add an HTML Editor field to the form and configure it as follows: visible
Image: Inserting an HTML Text Area component

Next, we find the desired image and encode it into Base64 format; for this step, you can use websites such as , base64-image.de,, or

.

Once we have copied the Base64 text (the format should be data:image/png;base64…), we return to the NetGrif Builder. In the HTML editor, we set the ‘Initial value’ field as follows:

  • <img src="BASE64"> where ‘base64’ is the copied data for the image that we encoded in the previous step
Image: Assigning an initial value for inserting an image

Checkbox settings

To configure the checkbox, we will create a simple text field in the form. Then, in CDESK, during form pairing, we will send the value of the custom field – which appears as a checkbox in CDESK – to the simple text field.

If we want empty checkboxes to be viewed as well, we must tick the ‘View empty checkboxes’ box in the connector configuration.

Image: Setting the display of empty checkboxes

Settings related to form generation

After configuring the individual fields in both the main form and the subform, go to the form for the main print report and click the Back button. Then right-click the Generate button and select Edit action. Next, you need to adjust the following settings:

Dataref button_html

Under the option Post, the following settings should be present:

textField: f.text_html_output,

style: f.text_style;

def transitionId = “t1”;

formToHtmlTable(textField, transitionId, style)

Image: HTML settings

Dataref button_pdf
The following settings should appear below the ‘Post’ option:

html_text_output: f.text_html_output,

file_pdf_output: f.file_pdf_output;

dynamicHtmlToPdf(html_text_output, "t1", file_pdf_output)

Image: PDF settings

Dataref button_add_subform_1
Under the option Post, the following settings should be present:

taskRef_subform: f.taskRef_subform;

def cnt = findCases({it.processIdentifier.eq(“FULLFILMENT_SUBFORM”)}).size();

def newCase = createCase(“FULLFILMENT_SUBFORM”, “Subform” + cnt.toString());

def newTask = findTask{(it.caseId.eq( newCase.stringId)).and(it.transitionId.eq(“t1”))};

def taskList = taskRef_subform.value + newTask.stringId;

change taskRef_subform value { taskList }

Image: Settings for generating a subform

After making these changes, export the XML file for the form and the subform as well.

Image: Exporting an XML file

Workflow Configuration

Upload the file to autoforms.cdesk.io. If a subform is included, you must upload that as well.

Image: Uploading an XML file

Next, in the section All cases and tasks, upload the XML file.

Image: Adding an XML file

After adding the file, you need to assign the PDF, HTML, and subform to the form.

Image: Assigning a PDF, HTML, and subform to a form

Once they have been assigned, you can preview the form. If the form is configured correctly, it can be linked to the CDESK system.

Image: Example of a configured form containing the CI parameters of an item linked to a request, as well as the parameters of the linked fulfillment

Changing the visual layout of the form

The entire form is generated from HTML code, which is generated based on an .xml document. Therefore, to change the style of the document and its specific elements, we can use CSS.

Style change on autoforms.cdesk.io

Since the entire form is an HTML table, we can change its style by applying CSS to specific elements. First, we recommend testing the desired style on the page autoforms.cdesk.io, where you can use the appropriate text area (the one at the bottom). After rewriting the CSS, you must click the HTML and PDF buttons again.

For inspiration, you can check out the additional tutorial: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Styling_tables

The image below shows a pre-filled example of applying CSS to an HTML table and its content.

Image: Area for entering CSS styles for the form table

Static style changes to form elements

Certain style changes to a specific element can be applied directly at the time of creation in Netgrif, by wrapping its content in the required HTML tag. For example, we can wrap text in <b></b>  which will result in bold text. At the same time, we can also define its style here; for example <p style=”color:red;”>Red text</p> should change the text colour to red.

Styles applied to specific elements in this way do not need to be defined repeatedly elsewhere.

Important note: static style changes apply ONLY to elements whose value will not change, i.e. the ‘visible’ elements of the form. If it is anticipated that a value will be retrieved from CDESK instead of the element, then the value of this field will be overwritten along with the predefined style!

Image: Example of wrapping text in an HTML "b" tag in Netgrif

Saving CSS styles for generated forms

The final version of the form’s CSS style must be saved in Generate → Edit form → the CSS section. If the CSS is not entered here, it will not appear in the resulting .xml file, so it will not be applied to forms generated in CDESK and autoforms!

Image: Steps for saving a CSS style
Image: Area for saving CSS styles

Adding the Netgrif connector to CDESK

To add the Netgrif connector to the CDESK system, go to Global Settings → Connectors, API and click the +Add Connector button. Once you have clicked this, a window will appear allowing you to select the connector type. Select the ‘Custom reports for NETGRIF’ option. Click the ‘Continue’ button to proceed.

Image: Selecting a Netgrif connector from the list of available connectors

A form for configuring the connector will then be viewed, containing the fields listed below. Mandatory fields must be completed; otherwise, the connector cannot be saved. Some fields are only viewed when certain settings are selected for other fields – this condition is specified for each field.

Image: Netgrif Connector Field Configuration
  • Connector type – this field cannot be changed. The type is selected when the connector is created.
  • Name – enter the name under which this connector will be viewed in the list of connectors. If the ‘Name of the button to start generation’ field is left blank, the connector name will also be applied as the text on the button that appears in the record details and is used to generate a report.
  • Enabled – the connector is active only if it is enabled. The button for creating a print report is viewed only when the connector is enabled.
  • Button name for starting generation – the text of the button used to generate the protocol in both the web interface and the mobile app, for example ‘Generate protocol’. If the field is left blank, the connector name will appear on the button. If multiple connectors are used for the same record, multiple buttons will be viewed. For this reason, it is advisable to name them in such a way that they can be distinguished from one another.
  • Place – specifies in which module the button for creating a print report will be viewed. The current version of CDESK offers the following options.
    • Requests
    • Requests created from the selected template – only requests created from the template selected in the ‘Request template’ field
    • Fulfilments
    • Requests and Fulfilments
    • Requests of the ‘Device repair’ type
    • Asset management logs
  • Request template – displayed only at places where ‘Requests created from the selected template’ are used. Specifies the template from which the request must be created for the button to generate a print report to appear.
  • URL – The URL of the page where the print report workflow was configured. In this case, it is autoforms.cdesk.io, which is also the default value for this field.
  • Login – the login used to log in to autoforms.cdesk.io
  • Password – the password used to log in to autoforms.cdesk.io
  • Form ID – on builder.netgrif.com, right-click outside the t1 and Generate boxes and select Configure Model. A window will be viewed in the right-hand pane containing the ‘Identifier’ option. In the ‘Form identifier’ field, enter the value from the ‘Identifier’ field. Multiple forms may be stored on a single server under a single login. This field specifies which one the connector will apply.
  • Multiply subform by quantity – specifies the basis on which the subform is repeated in the print report. If the form does not contain a subform, leave the option set to ‘No subform’. The other options are:
    • Fulfilment – the subform is repeated for each fulfilment
    • CI objects – the subform has recurrence for each CI object
    • User-defined CI Object fields – the quantity of recurrences is determined by the selected user-defined CI Object field, which is chosen in the ‘CI Customer Field for Multiplication Evaluation’ field
    • Tabs of user-defined CI Object fields – the subform is repeated for each tab of the user-defined CI Object fields
    • Protocol items – the subform is repeated for each protocol item in the asset management register
    • User-defined fulfilment fields – the quantity of recurrences is determined by the selected user-defined fulfilment field, which is chosen in the ‘Customer fulfilment field’ field for multiplication evaluation
  • PDF save location – the place where the generated final print report will be saved. It is possible to select multiple options at once: Request Attachment, Fulfilment Attachment, Attachment of the linked CI object and Offer for download.
  • Generate a separate report for each CI object in the request – this is only viewed when the ‘Request’ or ‘Requests created from the selected request template’ place is selected and the ‘Request Attachment’ save place is also selected. If this option is enabled and the request relates to multiple CI objects, a separate print report is generated for each of them.
  • Include only fulfilments linked to the given CI in the report – viewed only when the previous toggle is enabled. If enabled, only fulfilments directly linked to the specific CI object will be included in the report for that object. Fulfilments not linked to the CI or with a relationship to other CIs will not be displayed in the report.
  • Apply values from the service record to the report – specifies the source from which the report retrieves CI data. This field is always viewed.
    • Disabled – the report retrieves current values from all CIs on the request.
    • Enabled – the report retrieves CI field values from the service record, i.e. from the device condition at the time the record was created or last updated, rather than the current CI values. When generated from a request, it processes only those CIs that have an active service record linked to the request; other CIs are omitted. Only fulfilments included in the service record are included in the report, and when performing field pairing, the CDESK properties ‘Service Record → Customer Signature’ are made available.

The ‘Generate Report’ button directly within the service record will only be viewed if this field is enabled; the fields ‘Generate a separate report for each CI object on the request’ and ‘Include only fulfilments linked to the given CI in the report’ are also enabled, the ‘Usage’ field is set to ‘Requests’ or ‘Requests created from the selected template’, and the ‘PDF storage location’ field is set to ‘Service Record Attachment’.

  • Custom Styles – advanced settings for the styles of repeating rows in the subform and the footer of the print report. A template containing special marks is entered here. It supplements the CSS style stored in the form, as described in the chapter ‘Changing the visual appearance of the form’. In common use, this field remains empty.
  • View empty checkboxes – if enabled, unchecked checkboxes will appear as empty boxes in the print report. The procedure is described in the chapter ‘Checkbox Settings’.
  • Include internal fulfilments in the data – this option is only displayed if internal fulfilments are enabled in the fulfilment settings. If enabled, internal fulfilments will also be included in the print report data.
  • Deduplication of fulfilments – displayed for the following usage places: Requests, Requests and Fulfilments, Requests created from a selected template, and Device repair requests. If enabled, duplicate fulfilments with the same description and start-to-end times will be included in the report only once. Where there are multiple matching fulfilments, the fulfilment from the request handler will be applied. If there is none, the fulfilment with the lowest ID will be applied.

Once you have configured these properties, click the ‘Update report configuration’ button; this will cause the connector to save and retrieve the form fields from NETGRIF so that they can be synced with the CDESK fields.

Image: Mapping Netgrif form fields to CDESK fields

Each row in the pairing corresponds to a single form field and contains the following columns:

  • Form fields – the name of the field as it appears in the NETGRIF form.
  • CDESK properties – data from CDESK to be entered into the field. The data options depend on the settings for the usage location and also take into account the selected request template.
  • Merge properties – if multiple values are entered into a single field, for example from multiple fulfilments, they will be displayed one below the other. If this option is disabled, only one value will remain in the field. For data that cannot be merged, the toggle is inactive.
  • Add property description to value – the description of a user-defined field is appended to its value.
  • If the value is empty, apply the default value from the form – if the data in CDESK is not filled in, the field will be populated with the Initial value set in the NETGRIF form.

If a form contains a subform, a section entitled ‘Pairing subform fields to corresponding columns’ will also be viewed below the main fields. If the form is modified in NETGRIF, you must reload the fields by clicking the ‘Update report configuration’ button.

The following CDESK fields, for example, can be inserted in a print report. The offers available vary depending on the configured usage place:

  • Supplier – Company name and address
  • Request number
  • Deal number
  • Date of request creation
  • Request type
  • Service field of the request
  • Request description
  • Company
  • Company address
  • Text of the first fulfilment
  • Materials applied
  • First fulfilment – Assignee
  • Project lead for fulfilments
  • Final fulfilment – Assignee
  • Date of fulfilment
  • Start of fulfilment
  • End of fulfilment
  • First stage of fulfilment – transport
  • Fulfilment – transport
  • Final fulfilment – transport
  • Fulfilment – assignee’s signature
  • CI – name of the main group
  • CI – type name
  • CI – branch
  • CI – place
  • CI – name
  • CI – description
  • CI – status
  • CI – owner
  • User-defined fields configured for requests
  • User-defined fields configured for fulfilments
  • User-defined fields configured for CI objects
  • Logged-in user – Name and Signature

Once all fields have been mapped, save the settings by clicking the Save button. Once saved, the report can be run in the module selected in the Place field. If, for example, Requests is selected as the place, a button will appear below the Action button with the name set in the connector in the Button name to run generation field, or in the Name field, if the button name has not been entered. In the mobile app, the button is viewed in the request detail under Service Protocols.

Image: Button for generating a print report configured via the Netgrif connector

Was this page helpful?