kamalisto Posted March 9, 2010 Share Posted March 9, 2010 Code:Dear all,I want to create the group in ireport using a variables that i created which are in expression i write "(( $F{AGENCY}.equals("KJSB") || $F{AGENCY}.equals("JANM") ? "INTERNAL LOGS" : "EXTERNAL LOGS" ))".It means only agency KJSB and JANM show under group Internal logs but the orher angencies show under external logs.Hope u all can help me to solve this probs.The attachment that i attached was developed in crystalCode:[code]Dear all,I want to create the group in ireport using a variables that i created which are in expression i write "(( $F{AGENCY}.equals("KJSB") || $F{AGENCY}.equals("JANM") ? "INTERNAL LOGS" : "EXTERNAL LOGS" ))".It means only agency KJSB and JANM show under group Internal logs but the orher angencies show under external logs.Hope u all can help me to solve this probs.The attachment that i attached was developed in crystal Post Edited by kamalisto at 03/09/2010 02:12 Link to comment Share on other sites More sharing options...
thangalin Posted March 16, 2010 Share Posted March 16, 2010 Hi,Use two static text fields, like this:INTERNAL LOGS - PrintWhenExpression: new Boolean( "KJSB".equalsIgnoreCase( $F{AGENCY} ) || "JANM".equalsIgnoreCase( $F{AGENCY} ) ).booleanValue()EXTERNAL LOGS - PrintWhenExpression: new Boolean( !"KJSB".equalsIgnoreCase( $F{AGENCY} ) && !"JANM".equalsIgnoreCase( $F{AGENCY} ) ).booleanValue()Post Edited by thangalin at 03/16/2010 21:01 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