> Source: https://docs.cyberelements.io/identity/7.1/UserDocumentation/ReportsAuditsManagement/CreateModifyDeleteReport/

# Create/modify/delete a report

The report is configured using an XML file. You need to define:

- The query on the CyberElements Identity database to retrieve the desired information,
- The properties of each column to be displayed in XML format: Object type, name in the SQL database, name to be displayed, display index, etc.
- The graph display options (bar chart, pie chart, colored dots).

Click on the “New report” button to create and configure a new report.

Select a report and click on the “Modify” button to modify its configuration.

![New report](https://docs.cyberelements.io/identity/7.1/img/Identity/IdU_NouveauRapport.png)

## Properties of a report

| Parameter | Description | Types and possible values |
|---|---|---|
| Name | Display name of the report. | Character string. Mandatory. |
| Code | Corresponds to the ID of the object. Its value must be unique across all reports. | Character string , without spaces or special characters. Mandatory |
| Category | The report category in which the list of reports will be displayed. | List of predefined categories. |
| Description |  | Character string. |
| XML | XML tags describing the SQL query in the Hpliance database, the properties of each column in the report, and the properties of the graphic elements. | Text in XML format. |
| Choice of report template | Graphic template for the report (in addition to the data table). | Without chart, Histogram, Stacked histogram, Pie chart, or Color ball by threshold. |
| With parameters | Allows you to add variables entered by the user. You will need to add the tag to the XML. | Checkbox. |

## Write the XML for a simple report

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
```

**Example: List of users without a phone number**

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
```

## XML tags describing the columns of a report

| XML tag | Definition | Possible values |
|---|---|---|
| Name | The name of the field as it is defined in the SQL query. | Character string. |
| Column_Link_Id | Used for creating columns that contain clickable data. Corresponds to the name of the column containing the ID used to manage the link. | Character string. *Optional* |
| ObjectType | Target object type of the clickable link (Identity, structure). | Identity = 1 => Redirection to the userDetails.aspx page |
|  |  | Structure = 2 => Redirection to the structure.aspx page |
|  |  | *Optional* |
| DisplayName | Name of the column to be displayed in the interface. | Character string. |
| Visible | Indicates whether the column is shown or hidden. | 'TRUE' or 'FALSE' |
| DisplayIndex | Index of the column (display order). | Integer greater than 0 |

## Adding parameters entered by the user in the report:  tag

Select the “With parameters” checkbox and add the following tags to the XML:

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
```

**Example: Permissions about to expire**

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
```

XML tags in <Parameter> that describe the parameters that can be entered by the user:

| XML tag | Definition | Possible values |
|---|---|---|
| Variable | Name of the variable used in the SQL query (without the @). | Character string. |
| Data Type | The CyberElements Identity object type corresponding to the parameter. If it is not a basic object type (date, string, integer, etc.), the parameter will be a drop-down list containing the possible values. | Structure=2; Authorization Rule=3; Application=4; Repository=5; Right=8; StructureType=11; Tree=12; AdminProfile=18; PersonType=19; String=22; Integer=23; Boolean=24; Date=25. |
| Label | Label to be displayed to the user. | Character string. |
| AttributeCode | PSA attribute code. | Character string corresponding to a PSA code. |
| Mandatory | Indicates whether the user is required to specify a value. | 'TRUE' or 'FALSE |
| DefaultValue | For optional parameters, this is the default value that is entered if there is no entry input by the user. | Character string. |

## Defining the parameters for graphics

Select the graphic template from the drop-down list and add the following tags to the XML:

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
```

Stacked histogram

Insert the following tags into the  tag:

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
```

Colored circle per threshold

Insert the following tags into the  tag:

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
```

## Translating the names of the columns in a report

The columns and values included in the results of a report can be translated into several languages.

The following is an example of a report in which the columns have been translated:

```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
```

**XML tag**

- Internationaldisplayname:
    - **Definition**: Tag used to translate the names of the columns returned by the report. There must be as many instances of this tag as there are languages configured in CyberElements Identity.
    - **Attribute**: Lang=“<\language_code>” where <\language_code> represents the language code defined in the language settings in the General > Application Settings tab.
    - **Possible value**: Character string. The name of the column displayed in the report for the language.
- CultureColumnName:
    - **Definition**: Definition of the culture XML that is used to translate the contents of the table generated by the report.
    - **Attribute**: Prop=“<\XML_Attribute>” where <\XML_Attribute> represents the attribute of the XML property corresponding to the different values in the column.
    - **Possible value**: Character string. SQL query culture column.

## Displaying a report based on the user context

In version 4000 of Hpliance, it is possible to add an invisible parameter to a report that will be defined according to the person running the report. The values in the report will be displayed according to the values of a user attribute. For example, they will only see the results for their organization.

Report example: List all permissions assigned to the identities in a given structure. Display the last names, first names, permissions, and applications of all identities for which the "Responsibility" structure attribute matches the structure attribute of the connected user.

```
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
```

**XML tags that describe the parameters based on the user's context.**

- Variable:
    - **Definition**: Name of the variable used in the SQL query (without the @).
    - **Possible value**: Character string.
- AttributUserConnected:
    - **Definition**: Specifies whether the parameter is defined based on the context of the current user, or whether it needs to be entered manually from the interface.
    - **Possible value**:
        - True: User context
        - False: Manual entry
- AttributeCode:
    - **Definition**: PSA attribute code.
    - **Possible value**: Character string corresponding with the PSA code.
