Archi Forum

Archi => Archi Development => Topic started by: macknardy on December 11, 2018, 10:48:59 AM

Title: How can I separate each view individually?
Post by: macknardy on December 11, 2018, 10:48:59 AM
Hi everyone.

I'm trying to create a custom report using the JasperReport plugin. However I couldn't do it completely.

I'd like to show views in different parts of the report. Is it possible?

The code below prints all views in sequence but I need to place each one of them at a time.


<subreport>
    <reportElement isPrintRepeatedValues="false" x="0" y="40" width="515" height="20" isRemoveLineWhenBlank="true" uuid="0834205d-fd47-4315-99d6-610229e94773"/>
<subreportParameter name="REPORT_PATH">
    <subreportParameterExpression><![CDATA[$P{REPORT_PATH}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[((com.archimatetool.jasperreports.data.ArchimateModelDataSource)$P{REPORT_DATA_SOURCE}).getViewsDataSource()]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{view_report}]]></subreportExpression>
</subreport>


How can I separate each view individually?

Thank you.
Title: Re: How can I separate each view individually?
Post by: Phil Beauvoir on December 11, 2018, 16:56:35 PM
I think it depends on where you are referencing the subreport. It's a long time since I looked at the Jasper xml code, so it may be worth checking where you reference it.
Title: Re: How can I separate each view individually?
Post by: JacquesTessier on April 08, 2019, 18:34:47 PM
Hi I am new to archi and jasper. I am trying to produce a report of two views. I have many views created but I need to report on only 2 of them. What I have been doing is generating the full report and then doing cut and paste. I would prefer to generate what I need.

Also I would like to include the documentation before the figure

My two views are called Overview & BIATSP

any help would be appreciated
Title: Re: How can I separate each view individually?
Post by: Phil Beauvoir on April 08, 2019, 18:49:17 PM
Quote from: JacquesTessier on April 08, 2019, 18:34:47 PM
Hi I am new to archi and jasper. I am trying to produce a report of two views. I have many views created but I need to report on only 2 of them. What I have been doing is generating the full report and then doing cut and paste. I would prefer to generate what I need.

Also I would like to include the documentation before the figure

My two views are called Overview & BIATSP

any help would be appreciated

Welcome to the forums.

Even though I did the initial code for Jasper in Archi, it's been a long time since I looked at this aspect, so I can't really offer any guidance other than what I did - experimenting with the .jrxml file and much trial and error. Other people have used the JR editor.

Perhaps members of the community might help.
Title: Re: How can I separate each view individually?
Post by: Phil Beauvoir on April 08, 2019, 19:11:29 PM
Cue JB...
Title: Re: How can I separate each view individually?
Post by: Jean-Baptiste Sarrodie on April 08, 2019, 19:15:03 PM
Hi,

Quote from: JacquesTessier on April 08, 2019, 18:34:47 PM
Hi I am new to archi and jasper. I am trying to produce a report of two views. I have many views created but I need to report on only 2 of them.

You can do it by setting tags on views and reporting on this tag.

Look at the user manual  (https://www.archimatetool.com/downloads/Archi%20User%20Guide.pdf) on page 87.

Regards,

JB
Title: Re: How can I separate each view individually?
Post by: Phil Beauvoir on April 08, 2019, 19:15:55 PM
Quote from: Phil Beauvoir on April 08, 2019, 19:11:29 PM
Cue JB...

Told you. ;-)