nKognito Posted February 15, 2012 Share Posted February 15, 2012 I have some accounting report's summary with such rows: vat, net, total. How can I reposition some row after another was removed because it was empty?For example, if vat is empty, I set 'Remove line when blank' and 'Blank when null' - this will remove the line from the template. But I need to reposition the net and total rows.How can I do that?Thank you Link to comment Share on other sites More sharing options...
augarte Posted February 15, 2012 Share Posted February 15, 2012 Hi, Not sure if I understood your problem well. What I understand is that you need to show your three fields in one line, but if some of the fields does not have any value you want to print the other two fields.Suposing that you have the following fields: $F{vat}, $F{net}, $F{total}I would add a TextField to the report and edit the Textfield expression to put it as follows: $F{vat} + ' ' + $F{net} + ' ' $F{total}This textfield will have the options 'Blank When Null' and 'Remove Line When Blank' checked. This way, the line will only be removed if the values of the three fields are null/empty. If I misunderstood your problem maybe you could attach your jrxml file to see what do you want to achieve.Hope this helps,Regards. Link to comment Share on other sites More sharing options...
nKognito Posted February 15, 2012 Author Share Posted February 15, 2012 Hi, thanks for your reply.Actually, I have three rows of textfields - one under another. The problem is when I put empty value to first one, the others doesn't reposition to first's place. Link to comment Share on other sites More sharing options...
augarte Posted February 15, 2012 Share Posted February 15, 2012 Ok, Now I understand what you want to do but if you followed all the steps you mentioned in the first post it should work. I have tried exactly the same in the attached jrxml and works ok. The first field that I'm displaying is Cmp and if this field does not have a value or it is empty it does not occupy any space and the following field (Ide) is displayed below the static text. Check you have configured it correctly.Hope this helps.Regards,Aitor Link to comment Share on other sites More sharing options...
nKognito Posted February 15, 2012 Author Share Posted February 15, 2012 Thanks for your reply.I found what the problem was - fields should not touch each other.This topic helped me: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=20446Post Edited by nkognito at 02/15/2012 16:13 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