Jump to: navigation, search

Difference between revisions of "Reporting"


Line 1: Line 1:
'''This feature is obsolete {{Version/WinXSince|3.6}}'''<br /><br />
+
Reporting is the endeavor of providing requested data in the form of a document. There can be arbitrary reports about almost anything, but we always need to collect, extract, format and export the desired data.
 
+
== Techniques ==
Our Reporting feature allows users to create reports from queries, which will be saved to a file on disk, and displayed using a web browser.
+
With {{UBIK}}, there are next to no restrictions on how to approach reporting technically. However, we do have experience with several techniques and there is a [[Reporting_(Plugin)|reporting plugin]].
Reports will contain information about the child objects of the query that the user is currently viewing. All offline available children, as well as all their properties and their children will recursively be captured and written to the report file. Reports can be used for printing, documentation, or logging purposes.
+
Known techniques are:
Users may also configure custom styling for the reports.
+
* [[Reporting_(Plugin)|UBIK.Module.Reporting]] HTML/PDF report generation from managed code with Scriban
 
+
* [https://learn.microsoft.com/en-us/sql/reporting-services SSRS] SQL Server Reporting Services for data extraction from DB Views
== Creating a report ==
+
* [https://learn.microsoft.com/en-us/power-bi/create-reports/ PowerBI Paginated Reports] e.g., from Excel or an Azure SQL DB
Please see '''[[media:UBIK_WinX_Reporting.mp4|this video]]''' to see how to create and open report files.
+
== Approach ==
If you cannot view the video, follow these instructions:
+
In general, reporting consists of scope definition, collection, extraction, formatting and exporting.
 
+
=== Scope definition ===
# Navigate to any query object.
+
For any report, it is important to have very clear requirements about the temporal and spatial scope of the data. This means we want to know, for which time frame do we want to create a report, and precisely what kind of data is expected.
# Click the "Create Report" button in the left-hand pane.
+
=== Collection ===
# The application picker will immediately be shown. Pick the application you wish to open the XML file with.
+
In order to make a report about something, we need to get the source data first. We have to make sure we have access to all required data in a raw way. This might be an infrastructure topic; our technique depends on how we can access the data. E.g., in some cases where {{UBIK}} is hosted in the cloud, SSRS might not be available if the customer's IT doesn't allow it.
#* Due to a security feature of Chrome, the report will not be properly styled. Please use another browser.
+
Next, it might be necessary to provide a DB View or managed code providing access to the raw data.
#* You may also open the report using a regular text editor. Note that the report will not be styled in that case.
+
=== Extraction ===
# Reports will be stored under '''LocalState/Reports'''. You may open them again from this folder at any time, or discard them.
+
The raw source data rarely is available in a form that can be displayed in the report directly. Hence, the next step is to process the source data into the data we need. Usually, this means getting the data into a different shape, i.e., gather data from different source objects and put the individual parts into a resulting object. However, it can also mean running statistics or aggregation functions on the raw data.
 
+
=== Formatting ===
 
+
All the data in the world is of little use if it can't be interpreted. Therefore, a crucial step in reporting is to come up with a fine representation of the data. This means mostly the layout, labelling and graphical display of the data. Depending on the chosen technique, one can use various tools to design the report. As a consequence, we must also provide the data to the reporting service in a way it can be applied. Thus, we must design our data model and the used data types according to the report's needs. Extraction and formatting therefore are co-dependent.
== Styling reports ==
+
=== Exporting ===
The user can completely customize the look and layout of reports in any way they please. We have provided a default stylesheet that can be overwritten or edited. The stylesheet uses the XSLT language, which converts XML data into HTML, which is interpreted by web browsers. XSLT should be uses mostly for creating templates or "containers" for XML elements, while additional (external) CSS files can be used to handle (visual) styling. This is also the approach we used for the default stylesheet.
+
Usually, the receiver of the report wants it in the form of a nice document. Hence, exporting the previously generated report as PDF or publishing it on a web page are viable options that can be discussed with the customer.
 
+
== See also ==
=== Editing the stylesheet ===
+
* [[Reporting_(Plugin)|{{UBIK}} reporting plugin]]
Our default stylesheet will be located under '''LocalState/Reports/Stylesheet'''. If the stylesheet file or folders do not exist yet, our default stylesheet will be copied to this location upon app startup. The file will never be overwritten again by the default stylesheet, so it is safe to customize the contents of this file to your liking. To revert your changes quickly, you can simply delete the file again, and it will be regenerated once a new report is created, or the app is restarted.
+
 
+
To edit the stylesheet, simply open it with your favorite code editor or notepad. We suggest that you familiarize yourself with the XSLT (as well as HTML) syntax and functions before trying to make changes to this file. You can find an introductory tutorial to XSLT '''[https://www.w3schools.com/xml/xsl_intro.asp here]'''. Additionally, we have included comments inside the default stylesheet to clarify some of the code. Using XSLT, you can create templates for each individual XML element. To style these templates, you may use external CSS files (or inline CSS styles in HTML). For convenience, we have included an external CSS stylesheet within this XSLT file.
+
 
+
To view the changes you have made to the stylesheet, simply reload the report in your browser, or create a new one.
+
  
 
[[Category:WinX|Reporting]]
 
[[Category:WinX|Reporting]]

Revision as of 13:12, 5 July 2024

Reporting is the endeavor of providing requested data in the form of a document. There can be arbitrary reports about almost anything, but we always need to collect, extract, format and export the desired data.

Techniques

With UBIK®, there are next to no restrictions on how to approach reporting technically. However, we do have experience with several techniques and there is a reporting plugin. Known techniques are:

Approach

In general, reporting consists of scope definition, collection, extraction, formatting and exporting.

Scope definition

For any report, it is important to have very clear requirements about the temporal and spatial scope of the data. This means we want to know, for which time frame do we want to create a report, and precisely what kind of data is expected.

Collection

In order to make a report about something, we need to get the source data first. We have to make sure we have access to all required data in a raw way. This might be an infrastructure topic; our technique depends on how we can access the data. E.g., in some cases where UBIK® is hosted in the cloud, SSRS might not be available if the customer's IT doesn't allow it. Next, it might be necessary to provide a DB View or managed code providing access to the raw data.

Extraction

The raw source data rarely is available in a form that can be displayed in the report directly. Hence, the next step is to process the source data into the data we need. Usually, this means getting the data into a different shape, i.e., gather data from different source objects and put the individual parts into a resulting object. However, it can also mean running statistics or aggregation functions on the raw data.

Formatting

All the data in the world is of little use if it can't be interpreted. Therefore, a crucial step in reporting is to come up with a fine representation of the data. This means mostly the layout, labelling and graphical display of the data. Depending on the chosen technique, one can use various tools to design the report. As a consequence, we must also provide the data to the reporting service in a way it can be applied. Thus, we must design our data model and the used data types according to the report's needs. Extraction and formatting therefore are co-dependent.

Exporting

Usually, the receiver of the report wants it in the form of a nice document. Hence, exporting the previously generated report as PDF or publishing it on a web page are viable options that can be discussed with the customer.

See also