How to visualize an object tree in a report

When using Relatics, end users like to view structures (e.g. the SBS, RBS, FBS, WBS) in a tree. For this purpose the building block ”Tree” can be used in a Relatics workspace. Using the option “Download as” in a tree, you can download a file (Word or Excel), in which the information is visualised in a tree structure. Unfortunately, a report does not offer a standard solution for this. But it is still possible to present information visually as a tree in a report (in RTF, PDF and HTML formats). This article tells you how.

Visualizing a SBS in a report


In Relatics, I find it handy to reuse the query of the tree. First, convert the tree into a query pattern. You can then easily incorporate this in your report query. This way, you can be sure that the result will be the same in terms of data. But don’t forget to configure the right sorting manually. As an example:

I like to use Altova StyleVision to configure my report, and my favorite construction consists of a table inside another table:


For each system object that is found according to the sequence in the XML file, a new row is created in the outer table. The XPath Expression below has been applied:

Example XPath Expression table 1: A new row for each System object


In the inner table, separate columns with a fixed width are created for the number of parent system objects. Suppose a system object is found on the fourth level in the SBS. This means there are three parent system objects. In that case, three columns are created with each the same fixed width. This simulates the tab space that you see in a tree structure. To achieve this result, use the Xpath Expression below:

Example XPath Expression table 2: Create empty columns for the number of higher level system objects

1 to count(ancestor::System_Object)

The last column of the inner table displays the ID and the Name of the system object. I like to also display an icon in the visualized tree structure. You can do so by activating the attribute Icon in the report query of the System Object node. It’s easy to add an image afterwards in the report.

The final result is a report in which the system objects are visualized in a tree structure:


About Kris de Waal

Relatics Portret-120

After graduating in Business Administration with a specialization in Business Information Management, Kris joined Relatics as a Business Information Consultant. He is eager to learn about new concepts, technologies, IT systems and apply the knowledge in his daily work. In addition, Kris loves to work on new ideas and innovations to get more out of Relatics.