Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Comments in JasperReports template (jrxml)

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?

like image 964
Anand Devaraj Avatar asked Aug 12 '13 12:08

Anand Devaraj


People also ask

How do I comment in Jasper report?

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.

What is the difference between Jasper and Jrxml?

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.

What is static text in Jrxml?

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.


1 Answers

Use Callouts feature in iReport Designer tool


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:

Adding Callout in iReport


For more details look at comments in jrxml are erased by iReport post on http://community.jaspersoft.com

like image 83
Kahini Wadhawan Avatar answered Sep 20 '22 18:09

Kahini Wadhawan