mhbashar1 Posted January 2, 2008 Share Posted January 2, 2008 What is the difference between "print when expression" and "text field expression". What is used for what and HOW? Cud anybody give me an example Link to comment Share on other sites More sharing options...
itchytoes Posted January 3, 2008 Share Posted January 3, 2008 Hi -- <textFieldExpression> contains the data that you actually what to print for your text field. This is usually a field from your query result, or perhaps a calculation based on a field. Example: <textFieldExpression><![CDATA[$F{first_name}]]></textFieldExpression> printWhenExpression is very useful in controlling whether a text field should be printed or not, depended upon some condition. For example, maybe you don't want to print any first names that start with 'x': <reportElement x= .....> <printWhenExpression><![CDATA[!($F{first_name}.startsWith("x"))]]></printWhenExpression></reportElement> Betty 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