JasperReports Properties
Submitted by Ben_Charlton on Tue, 10/05/2016 - 12:35
I know that this is probably a little belated considering how far down the road you guys are with the header subreport implementation
but have you considered the option of using a resourcebundle / properties file
It could make customization a lot faster
eg.
ApplicationResource.properties
baseFontName = "SansSerif"
then in jrxml
<font fontName = "$R{baseFontName}" />
Re: JasperReports Properties
Ben - thanks for this information. The resource bundle facility may be very useful with some things. I will have a play.
Thanks, Tim G
Re: JasperReports Properties
Yeah the only problem Tim is it will need to be placed in the classpath of the application which might mean it needs to be bundled into the application. I dont think you can declare a path.
Its declared in the opening part of a jrxml specification
Interestingly you can also declare locales that overwrite default props similar to the OpenVPMS inbuilt locales. Eg.
and so forth
This could mean that we declare styles fonts and fontsizes in a properties file that means you could complete consistency across all designed reports and only make the change in one place. With the new header feature as well as this it could make report customization very quick and very valuable to the clients/practices.
Re: JasperReports Properties
We also need to consider the fact that as soon as we allow users access to a properties file and they might add new properties that clash with existing application properties, I believe properties cascade but I could be wrong...Tim A may need to comment here.
Re: JasperReports Properties
Ben - I was only thinking about handling the locale dependent stuff in the resource bundle. eg the tax name varies between GST, VAT, 'State Tax' as a function of AU, UK/ZA,US
I was not intending to use it to contain things like the payments instructions.
Hence I don't see that most users will have any need to play with the report resource bundle.
Regards, Tim G