How can I separate each view individually?

Started by macknardy, December 11, 2018, 10:48:59 AM

Previous topic - Next topic

macknardy

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.

Phil Beauvoir

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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

JacquesTessier

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

Phil Beauvoir

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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

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

Jean-Baptiste Sarrodie

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 on page 87.

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.

Phil Beauvoir

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