Archi Forum

Archi => Archi Development => Topic started by: Elevenz on July 22, 2016, 09:49:30 AM

Title: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Elevenz on July 22, 2016, 09:49:30 AM
Hi,
searching a method like indicated in subject: the possibility to generate a custom report only for filtered data (i.e. applications...) I found the following answer reagards a question similar to this one posted by a moderator in 2015.

"In your context, you have to know that using the customizable report you can put "tags" on views and then create a report containing only views matching a specific tag. I usually tag each views on my "big" model with tags telling me which application and project is concerned (that's 2 separate tags). Then If I have to create a PDF document about a project (e.g. for solution architecture) I just run the report with the tag associated with the project, if I want to provide usefull documentation about one specific application, I just run the report with the tag associated with the application."

It's an interesting use for my solution... but I would like to have more details about this "tags": where I have exactly to put tags, and how I have to create reports contaning only views matching a specific tag...
Can I use the template from customizable report and edit with JasperStudio... but which the section I have to edit or modify to put this tag...
Could you provide me an easy example or address me to same tutorial or book or article that explain step by step this scenario...

thank you so much, I really appreciate your answer.
Vi.
Title: Re: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Jean-Baptiste Sarrodie on July 22, 2016, 19:30:19 PM
Hi,

I think I should write a full blog post about this (and other similar topics), but as I haven't so much time, I will at least try to answer this specific question here.

Tags are just properties that you set on views (see first attachment). Key has to be "Report:View:Tag" and value can be whatever you want (but to keep it safe I suggest to use only lowercase without spaces).

Then to use it, just add "#tagname" after the report title when using the "Customizable Report" template from within Archi (see second attachment). Only views that match selected tag will appear in the report.

Does this help ?

Regards,

JB
Title: Re: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Elevenz on July 25, 2016, 07:59:31 AM
Hi Jean-Baptiste,

thanks for your reply and support, after several attempt, I arrived to the solution you posted.

...and it's ok for the views, the tag method works fine, but in the report, after the view, there is the list of overall application componets, not only the elements contained in the View selected with tag...

I've tried to use other kind of property --> Report: (hide:*,  Detailed...)  but with no success...

It is useless if i can't hide other Elements or Applications.

There is a manual or a section where all the Report: property is described?

thanks a lot JB
Vi.
Title: Re: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Jean-Baptiste Sarrodie on July 25, 2016, 08:05:30 AM
Hi,

All properties are discribed in the _READ_ME_ view of the "Customizable Report (with tag support)" model template (File > New > Model From Template...).

Here o copy of the current version of this READ_ME (model wide properties have to me set on the model properties list):

Properties that follow are used by the "Customizable Report"

There are two types of properties: "model wide" or "view only". "model wide" properties affect the whole report where "view only" properties impact only the rendering of the view having them set.


MODEL WIDE PROPERTIES

Report:Model:Hide:Business
   Set to "true" to hide the list of business concepts.
Report:Model:Hide:Application
   Set to "true" to hide the list of application concepts.
Report:Model:Hide:Technology
   Set to "true" to hide the list of technlology concepts.
Report:Model:Hide:Motivation
   Set to "true" to hide the list of motivation extension concepts
Report:Model:Hide:Implementation&Migration
   Set to "true" to hide the list of implementation & migration extension concepts.
Report:Model:Hide:Connectors
   Set to "true" to hide the list of connectors.
Report:Model:Hide:Relations
   Set to "true" to hide the list of relations.
Report:Model:Hide:Views
   Set to "true" to hide the list of views.
Report:Model:Hide:ViewNumbering
   Set to "true" to hide numbering at the begining of view name (regexp '^[0-9.]* ').
Report:Model:Cover:Background
   URL or path to an image used on the cover (595 x 842).
   If unset a default image is used. Set it to "null" to disable it.
Report:Model:Header:Background
   URL or path to an image used on page header (595 x 50).
   If unset a default image is used. Set it to "null" to disable it.


VIEW ONLY PROPERTIES

Report:View:Detailed
   Set to "true" to show a detailed list of elements.
Report:View:Hide
   Set to "true" to hide the view.
Report:View:Hide:Diagram
   Set to "true" to hide the diagram.
Report:View:Tag
   Use this property to tag a view (you can use this property multiple time). Tags can then be used to create a report containing only one specific tag. To do this add "#tagname" to the end of the report title (case insensitive). You can make a view visible for all tag using the special tag "all".

JB
Title: Re: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Elevenz on July 25, 2016, 08:33:20 AM
Thanks JB,

where I have to set model property? For Example, I want to hide applications: so I put a property in the Application folder (Report:Model:Hide:Application = true), but I continue to have all the list of the applications... Is that the place where I have to set that property?
The Model wide property goes in conflict with the view one?


[UPDATE]
Ok, I successfull hide all values by fill the property in root Model.

I believe it's not possible to report only the Elements, Applications and Relations tagged in the View component, isn't it? If it is possibile it's a great thing!!! I.e.  putting a specific property in an Application or Relation i.e.: show.this: true   having hide:application active...
Vi
Title: Re: Filtering application using "tags" in customizable report (Jasperreport)
Post by: Jean-Baptiste Sarrodie on July 25, 2016, 20:26:32 PM
Hi,

It's not possible to have the per element type report sections at the begining with only the ones used in the tagged views, but it is possible to set "Report:View:Detailed" to "true" on views so that each view comes with its own list of elements (with their doc and properties). This is the closest we can get.

Regards,

JB