avro Posted February 15, 2007 Share Posted February 15, 2007 Hi, I have a report that needs to show a textfield if there are rows returned executing a database query or not showing it if there's no result. How can I get this working? Thanks in advance. Link to comment Share on other sites More sharing options...
wegnerk Posted February 16, 2007 Share Posted February 16, 2007 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 More sharing options...
Teodor Danciu Posted February 19, 2007 Share Posted February 19, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now