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

Adding borders to textField depending on a param


gabrieltcb

Recommended Posts

Hi,

  I'm working with jasperStudio 6.3.1 and java.

  I have a subreport with a textfield with a full square border but I want just a line, depending on the java code.

  I was wondering if there's any way to do it,  using styles or something, but that depends on a variable in java. That's why I expected it to do it with parameters.

Thank you beforehand.

(edit: jaspersoft crashes everytime I create a new style, so creating a new style in not an option)

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi friend,
I would like to point out your attention at the option "Print When Expression". You could duplicate the textfield (for eg: One with all 4 borders and one with no borders). You could print the desired field based on your java param in the Print when expression.

Maybe I don't entirely understand your question, if so, share a screenshot what you have and what you intend to have.

Regards,
KKriplani

Link to comment
Share on other sites

Uiii to lay fields above each other and to print it on different printWhenExpression scenarios is one ... but IMHO the last solution that I would suggest. The more complex a report is/becomes, so more difficult it will become to maintain it with overlayed fields..so my experience!

So using a style is actually a good Idea... the conditional expression can also be on a parameter and not only on a field or a variable. There you are quite flexible.

What happes if you add a new style?  You said "crashing" ... Why can't you update to the latest JasperSoftStudio (and set the compatibility to 6.3.1 if needed explicitly)?

hth + regards

C-Box

Link to comment
Share on other sites

Thank you for answering.

With crashing I literaly mean the program crashes, and I've read that it's a common error in 6.3.1 version.

(On the pic) My idea is to put only the bottom border on some situations, but since it crashes, and the whole company works with this version, I may do it with params linked to the printWhenExpression, until I check if we can update JasperSoft.

 

Thanks again <3

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...