I have been working with Jasper reports and honestly there are times when i really want to pull my hair out. This feelings of anger reached new heights recently when was i trying to create a new report, now part of this could also be due to the age old J2EE system that i am using it  with.

Jasper reports

So on to business now!!Recently i was creating a new report, for which i was using another report as template and i must have spent hours trying to figure out why the report would not recognize a new field that i added. The problem happend during the mapping stage i.e. when the java code was sending the data to the reporting engine, all the data was being copied correctly except this one field. After much experimentation and mucking around I finally found the solution to my problem. When i created the new field the name of the field was say “abc” and the fieldDescription attribute was “xyz” and that is where the problem was. To fix it i simply changed the fieldDescription value to “abc” i.e. the same as the field name and that make the report work.

So the moral of the story(in the context of my issue) unless it is absouletly necessary ensure that both the field name as well as the fieldDescription are the same value while creating reports in Jasper reports .

Categories: Java


Leave a Reply

Your email address will not be published. Required fields are marked *