Skip to content

Commit

Permalink
Documentation additions, Reports, examples and use-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
matusmacik committed Apr 8, 2024
1 parent 77df406 commit d84ec19
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 33 deletions.
71 changes: 50 additions & 21 deletions docs/misc/reports/create-report-guide/advanced/index.adoc
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
= Create Report Guide
:page-since: "4.4"
= Create an Advanced Report

:page-upkeep-status: green
:page-keywords: [ 'report', 'create', 'reporting', 'advanced' ]
:search-alias: "create an advanced report"

This guide describe how to create report in GUI. We chose the example report of accounts with resource as parameter and with columns which shows some attributes from owner, to demonstrate all the functionality.

In first step we click on 'Reports' in left menu and next click on 'All Reports' in submenu. In footer of showed report table we click on new report button.

image::create-report-0.png[]
image::create-report-0.png[100%]

We want to create Collection report, so we select 'Collection report' in showed popup.

image::create-report-1.png[]
image::create-report-1.png[100%]

Now we see page for editing/creating report. We can fill basic properties, we need fill only name.

image::create-report-2.png[]
image::create-report-2.png[100%]

Next we can define type of exported file on tab 'Export'. Collection report have default CSV format, so we don't need fill it.

Basic configuration of report define engine, so we open 'Engine' tab. We can see Basic Tab for report engine. We don't need fill basic properties of collection report engine.

image::create-report-3.png[]
image::create-report-3.png[100%]

As first, we open 'Collection' tab, where we define base collection and filter for shadows. Select the object collection 'All shadows' as the base collection. We want to use resource as parameter, so we have to use it in filter.

As first we open 'Collection' tab, where we define base collection and filter for shadows. At first we select object collection 'All shadows' as base collection. We want to use resource as parameter, so we have to use it in filter.
//TODO

.Filter
[source,xml]
Expand Down Expand Up @@ -55,26 +60,35 @@ As first we open 'Collection' tab, where we define base collection and filter fo

image::create-report-4.png[]

As next, we define parameter, so we open tab 'Parameter' and add new value to table.
Next, we define a parameter, so we open the tab 'Parameter' and add a new value to the table.

image::create-report-5.png[]

We fill fileds for name with "resource", for type with "ObjectReferenceType" and for label with "Resource". Now we can edit row by edit button in last row. In panel with details of parameter select "Resource" in dropdown of field for 'Target type'.
We fill out the fields:

* name with "resource"
* type with "ObjectReferenceType"
* label with "Resource"
Now we can edit the row by the edit button in the last row.
Now in the details panel for the parameter select "Resource" in the dropdown as the 'Target type'.

image::create-report-6.png[]

As next we need define view, so we click on tab 'View' and select type 'Shadow'.
We need to define a view, so we click on the tab 'View' and select type 'Shadow'.

image::create-report-7.png[]

In next step we add new columns for shadow attributes name, kind, intent and one column for demonstration of custom column.
Creation of columns for shadows attributes is easy. We add three new column and fill fields name, path. When we want some specific label, we can fill it.
As the next step we add a few new columns for shadow attributes: name, kind, intent and also one column to demonstrate a custom column.
Creation of columns for shadows attributes is easy.
We add three new column and fill out the fields name and path.
When we want some specific label, we can fill it in.

image::create-report-8.png[]

We add one more new column and fill fields for name with "customColumn" and label with "Intent and Kind". Now we click on edit button in last column of row. We scroll down to 'Export' container and fill attribute expression with next code:
We add one additional new column and fill out the fields for name with "customColumn" and label with "Intent and Kind". Now we click on edit button in last column of row. We scroll down to 'Export' container and fill attribute expression with next code:

.Expression of custom column
.Expression for custom column
[source,xml]
----
<script>
Expand All @@ -86,19 +100,23 @@ We add one more new column and fill fields for name with "customColumn" and labe

image::create-report-9.png[]

Now we can show preview of actual report. We can show preview in bottom of the screen or in popup, we chose popup. For showing table in bottom of screen click on 'Show report preview' or showing in popup click on 'Show report preview in popup'.
Now we can have a look at the preview of the actual report.
We can see the preview at the bottom of the screen or in a popup, we chose popup.
For showing the table at the bottom of the screen click on 'Show report preview' or for the popup option click on 'Show report preview in popup'.

image::create-report-10.png[]

On report preview we can see table with columns and content, which will be shown in exported file.
On the report preview we can see the table with columns and content, which will be part of the exported file.

image::create-report-11.png[]

Now we can add subreport to our report. We close popup and open 'Subreport' tab. We add new column and fill name field with "owner" and field type with "FocusType".
Next we can add a sub-report field to our report.
We need to close the popup and open the 'Subreport' the tab.
We will add a new column and fill the name field with "owner" and the field type with "FocusType".

image::create-report-12.png[]

In next step we edit new subreport find field expression and set next snippet of code:
In the next step we will edit the new sub-report "find" field expression and set the following snippet of code:

.Expression of subreport
[source,xml]
Expand All @@ -112,7 +130,10 @@ In next step we edit new subreport find field expression and set next snippet of

image::create-report-13.png[]

Now we can add new column for email of owner. We add new column similar as for custom column and we set next snippet to export expression of column. Also we can fix of order of columns, so we edit every column and fill field for 'Previous column' by name of column which we want see before it.
Now we can add new a new column for the email attribute of the owner.
We add a new column similar as in the case of the custom column, and we set the next snippet as the export expression of the column.
Also, we can fix the order of columns.
For this we edit every column and fill out the field for 'Previous column' by name of column which we want see before it.

.Expression of owner email column
[source,xml]
Expand All @@ -129,9 +150,17 @@ Now we can add new column for email of owner. We add new column similar as for c

image::create-report-14.png[]

After we added new column, we can show again report preview in popup. We can see new column with email address from owner, which we got from subreports.
After we added the new column, we can have a look at the report preview in the popup.
Here we can see a new column with email address of the owner, which we got from the sub-report.

image::create-report-15.png[]

To end we can save and run report and open task. When task will finish, we can download exported file.
Finally, we can save and run the report and open the task which generated the report output.
When the task finishes, we can download the exported file.

== See Also

- xref:/midpoint/reference/misc/reports/examples/[Report Examples]
- xref:/midpoint/reference/misc/reports/configuration/[Report Configuration]
- xref:/midpoint/reference/misc/reports/configuration/collection-report.adoc[Collection Based Reports]
- xref:/midpoint/reference/misc/reports/configuration/dashboard-report.adoc[Dashboard Based Reports]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 45 additions & 5 deletions docs/misc/reports/create-report-guide/index.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
= Create Report Guide
= How To Create A Report

:page-upkeep-status: green
:page-keywords: [ 'report', 'create', 'reporting' ]
:search-alias: "create report"

== Description

This Guide contains a list of possibilities how you are capable to create a Report in midPoint.

In case you are interested in some more advanced configuration topics regarding reports please have a look at the following pages.

- xref:/midpoint/reference/misc/reports/configuration/[Report Configuration]
- xref:/midpoint/reference/misc/reports/configuration/collection-report.adoc[Collection Based Reports]
- xref:/midpoint/reference/misc/reports/configuration/dashboard-report.adoc[Dashboard Based Reports]

The following article contain some user story examples:

- xref:/midpoint/reference/misc/reports/examples/[Report Examples]

[#_create_basic_report]
== Create A Basic Report

There is a quick and easy way how to generate a report form an object list.
Expand All @@ -15,28 +30,53 @@ Let's visit a list of users:
* scroll to the *bottom of the screen*
* click *Create report* (‘pie chart’ button)

image::users-all.png[]
image::users-all.png[100%]

The screen represents a *“new” Collection report*. There are a couple of parameters we have to *input*
here

* type in the Name: *All users report*
* click *Save and run*

image::new-collection-report.png[]
image::new-collection-report.png[100%]

After success the top screen should have a “blue” banner stating that there is a task on the
background.

* click *show task* on it

image::show-tasks.png[]
image::show-tasks.png[100%]

* in the action button container on the top of the page click on the button *Download report*
* you should have a csv with *all the users in midPoint.*

image::export-report.png[]
image::export-report.png[100%]

[#_create_o_o_t_b]
== Execute an Already Existing Report

If we already have a *Report Definition present*, either one which was created by us or one pre-configure out of the box, we just need to find it among the *list of reports*.

* in *Reports >All reports* (or choose one of the report types)

image::reports-all.png[100%]

* Click on *"Users in MidPoint"*
* In the reports page Click *"Run original report"*

image::users-in-mp.png[100%]

* A window called "Report configuration before run" will pop up, click on *"Run Report"*

image::conf-b-run.png[100%]

* A blue banner will show up, click the *show task* string which is on it

image::run-usrs-in-mp.png[100%]

* in the action button container on the top of the page click on the button *Download report*

image::download-usrs-in-mp.png[100%]

== Intermediate Report Customization

Expand Down
10 changes: 5 additions & 5 deletions docs/misc/reports/create-report-guide/intermediate/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* set it to *your custom value*
* click search

image::all-users-tester.png[]
image::all-users-tester.png[100%]

* scroll to the *bottom* of the screen
* click *Create report* (‘pie chart’ button)
Expand All @@ -21,7 +21,7 @@ image::report-mptesters.png[]
* click the *File Format* panel
* in the *Export* container set the value to *HTML*

image::report-mptesters-ff.png[]
image::report-mptesters-ff.png[100%]

* click the *View* panel
* click + to *add a new column*
Expand All @@ -32,17 +32,17 @@ image::report-mptesters-ff.png[]
* in *Path* click the top drop-down and select *User*
* in *Path* click the bottom drop-down and type *emailAddress*

image::report-mptesters-view.png[]
image::report-mptesters-view.png[100%]

* after success the top screen should have a “blue” banner stating that there is a task on the
background, click *show task* on it

image::users-all-report-exec.png[]
image::users-all-report-exec.png[100%]

* in the action button container on the top of the page click on the button *Download report*
* you should have a *html* with your specific demands

image::mptesters-download-report.png[]
image::mptesters-download-report.png[100%]

== See Also

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/misc/reports/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Alternatively both possibilities can be also customized, or you can create your
As in the case with a large portion of midPoint objects, reports can be *customized* via configuration.
This is done either *directly in the GUI* or in case of some advanced scenarios by *editing* the *raw report object definition*.

== How To Use
== How To Use Reports

As mentioned above there are multiple possibilities for the usage of reports.
Either you can use the reports which are present in your midPoint instance *out of the box*.
For an example of this please see this xref:TODO[link].
For an example of this please see this xref:/midpoint/reference/misc/reports/create-report-guide/#_create_o_o_t_b[link].

You can execute a report in a couple of clicks *from dedicated places in the GUI*, as you can see in xref:/midpoint/reference/misc/reports/create-report-guide[this] example.

Expand Down

0 comments on commit d84ec19

Please sign in to comment.