Jump to content

Conditional display of fields


avro

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can use the printWhenExpression of the textfield. In IReport, go to the properties of the field and under "common", you can find it... the printWhenExpression needs a boolean value.

 

for example: if you only want the field to be print when it is empty you could write something like:

 

($F{field} != null) (depends on the datatype, what you have to write exactly...)

Link to comment
Share on other sites

Hi,

 

If you need that query to be executed with every row in the initial data source, or something similar, you would probably end up using a small subreport.

The subreport will execute that small query and you would have the chance to display the text field inside the subreport base on a <printWhenExpression> on the REPORT_COUNT variable of the subreport.

 

I hope this helps.

Teodor

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