Export HTML report with selected views

Started by jucanoma, September 19, 2017, 20:52:45 PM

Previous topic - Next topic

jucanoma

Hi everybody
In my area we want to share some of the views we have modeled in Archi but there are some views we can't share. Does is exist any plugin who can do this or is it neccesary to make an improvement in the HTMLReportExporter to make it possible.
I'm not expert in org.eclipse.swt components but I saw in the jasper package how to make a wizard to put in the first page the selection of views and in the second page the selection of the target folder. I'm not sure if this is the best way and I want to ask how can I iterate the model to show the views.
I appreciate your help
Best Regards
Juan

Hervé

Hi Juan,

What you wish to achieve is exactly what I implemented in my company.

You can do it using my database plugin (https://github.com/archi-contribs/database-plugin/tree/master/v2) following the following steps:

  • you export your model to a database (you may use a SQLite one if you will be the only one using it)
  • you create an empty model and import from the database the views you wish to expose (using right click "import individual componenents"). Please double check that you selected the "shared" import mode.
  • you export to the database this newly created model

This way, you can choose which views will be part of your second model and therefore which views will be reported to HTML.

The views will be shared between your two models. All the updates done in the views in your first model will be automatically seen in your second model.

By the way, you can automate the HTML report every night using a planned task on Windows or a crontab on Linux using my script plugin (https://github.com/archi-contribs/script-plugin).

Hope this helps
Hervé

Jean-Baptiste Sarrodie

Hi,

There's already a way to create a partial report in the default jasper report. This involves adding "Tag" properties to the views and then generating a report based on that tag.

This is explained in the "Jesper Reports" section of the Archi User Guide that your can open through the Help menu or read online (p. 85).

I've also designed a simple and rough way to hide parts of the HTML report but this is not mainstream for the moment.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

jucanoma

Hi JB,
I did the changes on the views and add the property to not see them in the jasper report and it works fine.
The problem we have is that the jasper report doesn't have the navigation behavior that the html report have.

Thanks for the information Hervé.

In the two ways we have to make several manual actions to show or not show a view.
I think the best way is to add a wizard in the html export function and select the views. Is it possible to do implementing a plugin? If it's possible, is there any documentation of how to get views information and how to send it to the html report function?

Best Regards
Juan

jucanoma

Hi everybody
I'm developping a new plugin to export selected views in html. My idea es to show a dialog with the available views and use an adaptation of the actual html export functionality to make the html.
I'm using the library of String template like the actual functionality but I'm having this error:
java.lang.NoClassDefFoundError: org/stringtemplate/v4/AttributeRenderer
Do I have to add anything in my nre project to have the library en the classpath?
This is my plugin.xml, the buld.properties
bin.includes = META-INF/,\
               .,\
               plugin.xml,\
               LICENSE.txt,\
               plugin.properties,\
               lib/ST-4.0.8.jar,\
               lib/antlr-runtime-4.4.jar,\
               templates/
source.org.archicontribs.reports.html.jar = src/
output.org.archicontribs.reports.html.jar = bin/

Any idea of the error?