Author Topic: How can I separate each view individually?  (Read 641 times)

macknardy

  • Newbie
  • *
  • Posts: 4
How can I separate each view individually?
« 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.

Code: [Select]
<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

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: How can I separate each view individually?
« Reply #1 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.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

JacquesTessier

  • Newbie
  • *
  • Posts: 4
Re: How can I separate each view individually?
« Reply #2 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

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: How can I separate each view individually?
« Reply #3 on: April 08, 2019, 18:49:17 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! https://www.archimatetool.com/donate

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: How can I separate each view individually?
« Reply #4 on: April 08, 2019, 19:11:29 PM »
Cue JB...
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 647
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: How can I separate each view individually?
« Reply #5 on: April 08, 2019, 19:15:03 PM »
Hi,

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! https://www.archimatetool.com/donate

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1501
  • Archi Guy
    • Archi
Re: How can I separate each view individually?
« Reply #6 on: April 08, 2019, 19:15:55 PM »
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate