Invisible text in JasperReports

I really like JasperReports, it’s cool.
But sometimes it can ruin your mind when you’re trying to understand why this report looks like so weird. So today I was trying to generating Excel report and saw the following picture:

What the hell? Where’s my data?

I had to debug JasperReports to understand why it happens. Finally I’ve got down to JRGridLayout#isOverlap which calculates whether the item intersects with some other report items. If isOverlap returns true the text is not rendered. In my case it was intersection with additional cells, created by the style box margin. After I’ve moved the margin from style to the textField itself – everything works fine now:

One more interesting thing here is the following: such a behaviour is format specific. For example you won’t see the same problem in PDF.

We’re using 3.0.1 version for our application and may be this weird behaviour is fixed already in the latest version. Now it’s 3.6.0