Jasper Report using Customizable Templates

Started by prgee, April 20, 2015, 16:34:48 PM

Previous topic - Next topic

prgee

Hi,

I'd like to be able to modify the Jasper report templates in the Customizable Report folder to exclude the User Properties. Unfortunately, I am not familiar with the Jasper jrxml files and wonder if you could point me to the correct file(s) to edit. I noticed that there is one named "properties.jrxml" but it does not look like it relates to Archi User Properties.

Thanks and Regards,
Peter

Jean-Baptiste Sarrodie

Hi,

I'm not sure to really understand... Do you just want to have a report without property sections (thus only diagrams and documentation for views and documentation for elements) ?

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

prgee

That's correct - exactly as you described.

Peter

Jean-Baptiste Sarrodie

So in this case you should:

  • Copy "Archi/plugins/com.archimatetool.jasperreports_3.x/reports/Customizable Report" folder somewhere and work on that copy.
  • Edit elements.jrxml and view.jrxml using iReport or JasperReport Studie (I did the test using the old but great iReport 4.5.1).
  • Set the "Hide When Expression" to "false" for band 6 in view.jrwml and bands 3&4 in elements.jrxml (see attached screenshots).

You should end up with the same files as those attached ;-)

Regards

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

prgee

Awesome! I can't thank you enough for the assistance. This may be a useful feature for a future release since the User Properties often contain low-level technical details that are not wanted on a high-level report targeted to executives. Something like a Report:View:Hide:Properties parameter, for example.

Cheers,
Peter

Jean-Baptiste Sarrodie

Happy to help ;-)

I agree, that could be a good improvement for futur release.

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

prgee

Hi JB,

My custom report is looking pretty good but I have a couple of questions related to the "Report:Model:Cover:Background" image.
I have created my own PNG file but it seems to be shifted to the right a bit when it prints. Does it use the "left margin" setting when it prints the image? Also, the graphics on the background image seem a bit grainy. Can I create the image at a higher resolution than 72 DPI?

Thanks,
Peter

Jean-Baptiste Sarrodie

Hi,

If I remember well, background image starts from the top left corner without any margins. This has been chosen to allow full page picture if needed. So if you want some margins you have to include them in the image (or change the report template).

Regarding resolution, I think there's a limitation inside jasperreport, but I've never done any real investigation on that topic as the background I use is a simple one. Feel free to test and tell us what you've found ;-)

Regards

JB

If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

prgee

Hi JB,

I'm not sure - I cropped 40 pixels (the margin setting in main.jrxml) off the left side of the image and it now prints OK.

As for the resolution, I think you are correct. I researched a number of Jasper forums and FAQ's which all seem to agree that it is difficult, if not impossible, to change it from the standard 72DPI.

On another note, I have modified the report settings from the current A4 settings to print on 8.5 x 11 inches which is the North American standard. Once I have finished testing I'll post them to the forum for the benefit of Archi users in Canada and the US.

Peter

johmut

Old Thread, I Know but I am trying to do the same in Archi 4.9.2, i.e. report without element properties.
As far as I can see in elements.jrxml the condition to print the element properties is if Report:View:Detailed is true. Yet I can set it to true or false and in both cases the element properties are printed. If I change the condition to CDATA[false] the element properties are omitted and the documentation is printed. Am I missing something ?


Jean-Baptiste Sarrodie

Hi,

Quote from: johmut on March 29, 2022, 16:18:00 PMAs far as I can see in elements.jrxml the condition to print the element properties is if Report:View:Detailed is true. Yet I can set it to true or false and in both cases the element properties are printed

Report:View:Detailed is used to show properties of elements in a view. If set to false you'll no more see elements' properties from the view, but (1) you'll still see view's properties, and (2) you'll still see elements' properties from the list of all elements.

Can you clarify what you are trying to achieve with more details?

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

johmut

Hi JB,

I extensively use Properties (Metadata) for element governance, e.g. Created by, Created on, Modified by, Modified on, Validation Status, Version, ChangeLog, ... I need to generate Business documentation on models where they review the views and element documentation. I am trying to generate this business documentation without the element properties. I do need the elements, element type, documentation text etc. An additional switch, something like Report:Model:Hide:Properties would be ideal ...

KR,
johmut


Jean-Baptiste Sarrodie

Hi,

Quote from: johmut on April 08, 2022, 14:41:29 PMAny thoughts

Well, the display of elements (together with their properties) is managed by the elements.jrxml file. So the only short term hack I can think of is to edit line 80 to disable the print of properties in the context of the global concept listing (and not the view) :

<printWhenExpression><![CDATA[false]]></printWhenExpression>

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate