How to add comments in JasperReports template file (JRXML). I need to add some comments in each band to describe the functionality of band and also the need to write some comments for sub reports. So how do I add comments to jrxml file?
In older versions of Jasper (0.6. 0), I use simply create a parameter named "Comments" and use the parameterDescription to make my comments. Here, I can add anything I like. My comments can be as long as I want and can span as many rows as I need.
jrxml is a human readable XML file that contains the report template i.e. report structure and its formatting rules. . jasper is the compiled report template i.e. compiled . jrxml file.
Static text is used for creating labels or to print static text set at design time, that is not meant to change when the report is generated.
Since iReport 3.7.1 there is an element called Callouts added especially to cater to comments provision.
Go to Window -> Pallete menu in iReport designer. These "Callouts" works like sticky notes in the iReport interface and in the generated XML it looks like this:
<property name="ireport.callouts" value="##Mon Aug 12 18:03:15 MSK 2013\ncallouts.2.text=This is Detail band\ncallouts.1.text=This is Title Band\ncallouts.2.bounds=353,118,150,75\ncallouts.1.bounds=34,17,239,83"/>
In GUI designer (iReport) notes look like:
For more details look at comments in jrxml are erased by iReport post on http://community.jaspersoft.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With