sledgeas Posted October 13, 2008 Share Posted October 13, 2008 Good day,How to hide a column if its values are null? (in my case the table will have only one row)Very much thanks; the question is short but it would be a major breakthrough for me..-- sledge Link to comment Share on other sites More sharing options...
prasad_psl Posted October 14, 2008 Share Posted October 14, 2008 Check box is there when you use the fields as drag to report to display.So there is a check box "blank when null" you check there it can easily avoid the blank column prasad Link to comment Share on other sites More sharing options...
sledgeas Posted October 14, 2008 Author Share Posted October 14, 2008 Thanks. But the problem is that I need to shift to the left all columns which are to the right of this hidden one.. Provided there might be some hidden columns among them too (recursion) Thanks huge, if we break this through-- sledge Link to comment Share on other sites More sharing options...
sledgeas Posted October 15, 2008 Author Share Posted October 15, 2008 Anyone?.. Please, this is a major breakthrough in the project.. Link to comment Share on other sites More sharing options...
sledgeas Posted October 15, 2008 Author Share Posted October 15, 2008 If I solve this issue, our whole company staff (20 ppl) would be trained and using iReport! Link to comment Share on other sites More sharing options...
drlaz Posted October 15, 2008 Share Posted October 15, 2008 If the columns are all the same datatype and format, this is what I would do.First, you will need a Scriptlet class.Second, create report variables for every column. Let's say x1 .. xn. (It might be possible to use an array or Vector here, I'm just sketching out an idea.)Third, bind the report fields to the variables instead of the database fields.Fourth, use the scriptlet to assign the variables as each row is evaluated: x1 gets first non-null database field, x2 gets second, etc. You can do this in a clean loop if you use arrays or vectors in a sensible way. Link to comment Share on other sites More sharing options...
deloreanguy Posted September 8, 2010 Share Posted September 8, 2010 Was there any other solution than the Scriptlet? I, too, have a need for dynamic column presentation where all the columns to the right are scooted to the left when a column isn't printed...?-DeloreanGUY Link to comment Share on other sites More sharing options...
jasperjones999 Posted February 12, 2018 Share Posted February 12, 2018 I find it truly incredible that questions like this get no answer even after 10 years, if a reporting tool is designed to create reports how it can possibly be trusted when deadlines are tight, and the work needs to be delivered. If this functionality is not easily accessible “by default” then there is no point in deploying or even wasting time in training people in the use of Jasper Reports. Then there is the support aspect, every problem I have encountered and there are many trust me, I have had to solve with trial and error. It looks like many others here have simply left this forum and started using other tools because of the lack of creditability of Jasper Studio and reports. Link to comment Share on other sites More sharing options...
Solution kkumlien Posted March 8, 2018 Solution Share Posted March 8, 2018 This tutorial explains exactly how: 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