Skip to content

Variable reports

Variable reports are very useful to customize your own i-doit installation for your individual needs.

Example department printer#

A lot of users already use the custom categories. One thing which characterizes the custom categories is the possibility to link objects.

To give an example: Say that your company uses printers which are assigned to certain offices. The rooms 1.01 to 1.07 use HQ Staff Printer 01, rooms 1.08 to 1.11 use HQ Staff Printer 02.

This can be documented with the custom category Department printer. This category is assigned to the object type Printer and defined as single-value category. The Department printer for attribute is added as Object-Relation (Several objects) with the addition Share Access.

Object-Relation

Then open the object HQ Staff Printer 01. Now you can select the assigned rooms in the Department printer category.

Printer

The result in the category is shown in the following picture.

category

You can also visualize the result with the CMDB explorer.

CMDB explorer

But when you have a look at room 1.05 now, how can you find out which printer is assigned to this room? For this purpose, you need a "mirrored view" with which you can see which printer is related to this room. The variable report provide a good solution for such context-related queries.

To this end, you set up a report and another custom category. First, you create the report Assigned department printer. Select some significant attributes regarding the printers for the Output. The query builder provides the possibility to set a Placeholder for all links which generate relations under Conditions.

In our case this means: The report "searches" for those objects in which the object ID of the currently selected object is listed in the custom category Department printer in the attribute Department printer for. But what is the selected object? There is no selected object in the context of the report manager. This turns the report into a variable report.

Report

Therefore, an object must always be selected in order to populate the report. In this case you can achieve this by creating a category for the report which executes the report within an object. This is called Department, assigned to the object Room and defined as single-value category. There also is an unnamed attribute with the Field type Report. The ID of the above mentioned report is specified under Addition.

Field type Report

The report ID is contained in the overview of the already defined reports.

Field type Report

Now the new category is available in room objects. It always generates the report for the object in which the user currently is. By this means, you get a mirrored view of the relation to the department.

Field type Report