Hello! i'm new into world to JasperStudio.
I have a table where the all cells have the styled borders. Within, the "text fields" it automatically resize if necessary.
One of these fields, has value string empty, by my function
case WHEN ({field} = null) THEN ' ' ELSE {field} || ... (etc.) end
The problem is that the "text field" seems not rendered with string empty, although isBlankWhenNull="false", and i have this unpleasant effect.
.png)
* Into image i have forced backgroud-color red, for let you see that "text field" is not rendered.
Is possible constrain the render also is string empty?
Or there are other solutions.
Thanks in advance.
3 Answers:
Posted on April 22, 2016 at 3:34am
Not sure what you're trying to do but JasperReports seems to be working as you've specified. Why are you setting value to blank when null instead of isBlankWhenNull = true? I'm not sure of what you're trying to do but if you just want to have empty bordered cell, place a static text over the text box and set Print When Expression so that static text will be printed on the field is null and text field not printed when the value is null.
Posted on April 22, 2016 at 6:44am
To answer your question:
Why are you setting value to blank when null instead of isBlankWhenNull = true?
i started with isBlankWhenNull="true", for avoid the print "null" into field, but
i obtained the same unpleasant effect that i have now.
My solution is manage the value, with string empty, before to be processed by jasper. The problem seems be that the "text field" if it find "string empty", It treats him as NULL and not print the value. The background-color of text field, shows that the element it is not rendered.
Your idea is good, a bit it me bothers duplicate all fields for manage a value that could be print how to received.
Thanks hozawa
Hi, Could you please explain better about your requirement?
Regards,
KKriplani
My scope is avoid, in case of downsizing of the fields for the content, that is shown cell border, since into first two cells the value is string empty, seems the text field is not rendered