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

Need to print 2 static text fields depending on another field in ireports


ethereal_robe

Recommended Posts

I want a textfield to be visible only when a condition is met, so I clicked on "print when expression" button and pull a field called "$F{state}". That state gets a string. What I want to do is catch when state = sent to make the textfield appear. I tried doing the following:

$F{Estado-state} = sent

but it does not work, I need help finishing this expression.

The error I get when trying to generate a report is as follows:

Report Error

Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: Errors were encountered when compiling report expressions class file: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: calculator_Cotizaciones_1392769053109_320557: 817: class org.codehaus.groovy.ast.expr.CastExpression, with its value '(java.lang.String) field_Estado45state.getValue()', is a bad expression as the left hand side of an assignment operator at line: 817 column: 92. File: calculator_Cotizaciones_1392769053109_320557 @ line 817, column 92. 1 error

 

Link to comment
Share on other sites

  • Replies 3
  • 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...