preetipratapyahoo.com Posted September 11, 2007 Share Posted September 11, 2007 Hi, How can i remove a field from the report ,when the value of the field is null.i used "Blank when null" and "remove line when blank" options,but the there is a blank space is in my report.Can i remove/hide that blank space? Link to comment Share on other sites More sharing options...
svenn Posted September 11, 2007 Share Posted September 11, 2007 Do you want to remove an item in a column of items or do you want to remove a whole row? ie you have columns a b c d e and c is null so you end up with a b d e and would like to print in out as a b d e The only way to do this is to layer controls on topof each other and control their creation with the "Print when expression". Link to comment Share on other sites More sharing options...
preetipratapyahoo.com Posted September 12, 2007 Author Share Posted September 12, 2007 Hi Svenn, In my report i have rows likeab c de If the value in the row c is null,i dont want to design my report abde Can u please tell me how can i use "Print when expression" to achieve this? Thanks in advance Link to comment Share on other sites More sharing options...
svenn Posted September 12, 2007 Share Posted September 12, 2007 Ok it sounds like you don't want to show a blank row when C is null. To do this you need to set a value in the print when expression of your detail band. 1. Go to band properties View -> Bands 2. Choose the detail band 3. In the Print When expression create an expression that evaluates to true when your row has a value. say your data source is the following SQL select rowA from tableA Your expression could be new Boolean($F{rowA}.intValue()!=null) Link to comment Share on other sites More sharing options...
nickw Posted September 15, 2007 Share Posted September 15, 2007 Simply setting isRemoveLineWhenBlank to "true" will achieve this provided all elements in the row are blank. Svenn's solution can only work if every field in the detail row evaluates to "null" and you've got isBlankWhenNull set to "true". 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