[#9791] - Apparently empty cells aren't empty, only after a non-empty cell

Category:
Bug report
Priority:
Normal
Status:
Feedback Requested
Project: Severity:
Minor
Resolution:
Unable to Reproduce
Component: Reproducibility:
Always
Assigned to:
0

We produce an Excel report with Jasper. One column is defined to be a text field with:

* Expression: $F{closingDate}
* Evaluation Time: Now
* Blank When NULL
* Strech With Overflow
* Pattern "dd.MM.yyyy"

In the model, the 'closingDate' is of type 'java.util.Date' and some values are NULL.

If you look at the attached file, you'll see something pretty interesting: Apparently empty cells aren't empty until there has been an non-empty cell. This causes formulas to no longer work, as you can't detect whether a cell is empty or not. As it's seen as non-empty, excel tries (and fails) to use that "empty" value for calculations.

Investigating the underlying XML reveals, that the non-empty empty cells contain a reference to a shared string like so:
<v>0</v>

which is defined as:
<si><t/></si>

Whereas truly empty cells have no tag at all, or (you can test this manually) an empty tag (so no shared string reference).


Is there anything that I can do about it or is it truly a bug in Jasper?

AttachmentSize
jasper-bug.xlsx8.44 KB
v6.4.0
JasperReports
michel.jung's picture
Joined: Aug 10 2017 - 6:44am
Last seen: 2 weeks 3 days ago

6 Comments:

#1
  • Assigned:» shertage
#2

Hi,
We couldn't reproduce this bug locally. See the attached JRXML file that can be run using a JREmptyDatasource with multiple records.
If possible, please post your JRXML sample file.
Thank you,
Sanda

AttachmentSize
empty_cells.jrxml1.3 KB
empty_cells.xlsx8.81 KB
#3
  • Status:New» Feedback Requested
#4

Also, another useful information would be which Jasper version do you use in your application. Try to update it to v.6.4.1, if possible.

#5

I am using v6.4.1. I specified v6.4.0 in the bug report since v6.4.1 is not available in the dropdown. I try to provide a jrxml.

#6
  • Resolution:Open» Unable to Reproduce

Hi,

Anything new on this one?

Thanks,
Sanda

Feedback