Archi Forum

Archi => Share your Models, Templates and Reports => Topic started by: lemoux on October 21, 2019, 18:55:44 PM

Title: Simple report example to get a single diagram displayed ?
Post by: lemoux on October 21, 2019, 18:55:44 PM
Hi all,

I'm struggling to get a simple report generated based on archi available sample and jasper documentation.
Could anybody share a simple report template in order just to get a single diagram displayed ?
It would help me getting started especially with archi as data source...

Kind regards,
Laurent
Title: Re: Simple report example to get a single diagram displayed ?
Post by: Phil Beauvoir on October 22, 2019, 09:11:19 AM
Hi Laurent,

Jasper is not really suited for showing single diagrams, I think if you want to just one diagram out of many you might have to apply some logic to the template. Perhaps someone else might be able to advise?

Phil
Title: Re: Simple report example to get a single diagram displayed ?
Post by: rheward on October 22, 2019, 09:27:51 AM
Have a look at my post

https://forum.archimatetool.com/index.php?topic=746.0

which uses a jArchi script to read a view that decides what other views to dump out in a file. Sounds more complicated than it is.
You could even cut it down to a couple of lines just to grab your view with this being the key line of code:


var bytes = $.model.renderViewAsBase64("yourviewname", "PNG", {scale: 1, margin: 10});


Title: Re: Simple report example to get a single diagram displayed ?
Post by: lemoux on October 22, 2019, 12:30:01 PM
Hi,
Thank you both for your quick answers and the advice.
I'll study the jArchi script.
Kind regards,
Laurent