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
3 Answers:
This tutorial explains exactly how: https://www.youtube.com/watch?v=Bmrqo9fDkOs
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.
-DeloreanGUY
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.
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