How to create your own report for Archi - archimatetool/archi GitHub Wiki

Here is a attempt at clarifying the way to create your own report for Archi. This is obviously a work in progress intended to answer most common questions seen on forums.

First things first: you might not need to create a custom report if you only wish to change the cover and header images. You can easily do it through custom properties to set on your model as describe in Archi's User Guide in the "Customizable Report" section (p.95 as of writing).

So lets start with Frequently Asked Questions:

  • What tool do I need ? Being based on JasperReport, you need either iReport or ReportStudio. Prior version 3.0, Archi uses a rather old version of libs so at the end I strongly recommend iReport v4.5.1. Started with Archi 3.0 you should be able to use any recent version of both tools.

  • Should I start from scratch or use a kind of template ? You should definitly start using one of the report templates that ship with Archi. You can find them under Archi\plugins\com.archimatetool.jasperreports_*\reports. Copy one of them wherever you want and give the folder a new name.

  • I've done some changes in the template, but how do I test it ? There's no obvious way for testing inside iReport or ReportStudio, the only way is to do if from Archi itself: just open some model, go to File > Report > Jasper..., define target (location, filename, title...), move on and choose Custom... on the drop down list to select report file named main.jrxml from your new report.

  • Is there a way to create some SQL like queries ? Short answer: no. Long answer: yes, there is now support for this in the HTML report.

  • So how do I extract information from my model, how does it work ? You will in fact use java methods to access information. These methods starts with com.archimatetool.jasperreports.data. and are not documented yet (I will do my best to cover this topic in the near futur), so you will have to figure yourself how to use them.