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

Return value of variable is null inside report


mpolo91

Recommended Posts

Hello,

in Jaspersoft I create a variable of type string that do a simple operation inside a tenary code.

($P{Param1}.length() == 0) ? $V{var_x} : $V{var_x}.length() == 6 ? $V{var_x} + $P{Param2}.toString() : "Error"[/code]

In this case var_x represents a string like "01.01.". If true var_x should be concatinated with an int value like 1971.

But the return value of the variable is always null. Because I'am new to JasperReports and Jaspersoft I'am not sure if this is a setting inside the software or if the ternary operator is not valid in Jaspersoft.

Did someone have a hint for me?

Kind regards

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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