Jump to content
We've recently updated our Privacy Statement, available here ×

Render text field with string empty


msolari

Recommended Posts

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.

gridexample(1).png.7e7d068f83bf6640a63559a29335c7ae.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.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...