Here’s the translation:


title: “Relationships” linkTitle: “Relationships” weight: 300 type: docs description: >

Introduction

In reporting, relationships are used to define how information from different tables is related. Effective structuring of a report requires a clear distinction between parent and subordinate data, organized according to the defined characteristics and hierarchy levels of the data source. The tables created and their relationships are displayed in the “Data Sources” section of the report designer. Under each table name, the relationships are listed, always running from the subordinate to the parent table. For example, the connection “WindowsWorkstation_Overview-WindowsWorkstation_Software” under the table “WindowsWorkstation_Software”, where the separator “-” distinguishes the parent from the subordinate table.

Relationships | Introduction

Automatic Relationship Creation

In Docusnap365, relationships for reporting are automatically created during the data source definition if they can be derived from the defined hierarchy. In the example mentioned above, information from the “Overview” (fully qualified hostname and model) and from the “Software” category (name, publisher, license key) are considered. After defining the data sources, the tables “WindowsWorkstation_Overview” and “WindowsWorkstation_Software” are created. The relationship between these two tables (“WindowsWorkstation_Overview-WindowsWorkstation_Software”) is automatically created by Docusnap365 as it can be derived from the hierarchy. This relationship is listed in the report designer under the table “WindowsWorkstation_Software” and is named “WindowsWorkstation_Overview-WindowsWorkstation_Software”.

Relationships | Introduction

Manually Creating a Relationship

Docusnap365 can automatically create relationships in the previously mentioned examples. However, the following example shows why sometimes manual relationship creation is necessary: For a report where software is listed at the top and all workstations on which it is installed are listed below, a data source must first be created that contains all the necessary information.

Create Data Source

Relationships | Example

Create Report

Relationships | Example

Customize Report

Manually Create a Relationship

Once the data source and the empty report are prepared, the report can be opened in the report designer. In the dictionary under “Docusnap365”, four tables are listed:

Underneath the table WindowsWorkstation_Software, the automatically created relationship between WindowsWorkstation_Overview and WindowsWorkstation_Software is displayed. This relationship arises from the common object type affiliation of both tables, as both relate to Windows workstations.

Relationships | Example

For a report that shows software on the top level and the systems on which it is installed below, a manual relationship between the tables Software_Overview and WindowsWorkstation_Software is

necessary. Since these tables represent different object types, the relationship cannot be automatically established. To check whether a software from the overall list is installed on a system, the properties software name, publisher, and version are used. Based on these criteria, a match is checked at runtime; if a match exists, the corresponding system is displayed below. Details on configuring the report structure can be found in the chapter Set Report Structure. The following settings must be made to create the report in the desired form:

After saving, the relationship “Software_Overview-WindowsWorkstation_Software” is visible below the table “WindowsWorkstation_Software”.

Relationships | Example

Build Report

Create Parent Level

Create Parent Level

Create Subordinate Level

New Report - Create Second Level

The report in this form will first list all software products and then all systems. In the next step, these elements are connected by linking the lower data band with the upper data band.

Connect Subordinate Level

To make the system information more clear, slightly move the first field in the lower data band to the right by dragging and dropping.

Connect Subordinate Level

After clicking “Save and Generate”, the report is generated according to the configuration. After completion, it can be called up for preview via the context menu.

Relationships | Example