Home
Analytics
Hiding table column
kallem
I have created a table where I have in one column's detail cell a list that uses different data set than the table. List filters data based on parent table row content and it's own criteria.
In some cases the the list can be empty. When that happens I should hide the column entirely. Auto resize would work nicely but as I have label in the column header etc. in the footer those items prevent resizing to 0. So far I haven't been able to figure out how to hide column..
Would it be possible to bind column or column content visibility to list visibility? Or would it be possible to change column visibility when list content is generated? In the later case can I somehow get access to table from the list script?
Thanks in advance,
Kalle
Find more posts tagged with
Comments
mwilliams
Hi Kalle,
If I'm understanding correctly, you should be able to bind a text box to the list's dataSet and put it above your table, go to the visibility section of the property editor for this text box and hide the box, then go to your dataSet that is bound to your nested list and set a variable in the onFetch method to a different value than what you initialize it to in the initialize method of your report, then in the visibility for the column you're wanting to hide, create an expression that checks this variables value to determine whether to hide the column or not. Let me know if you need a less confusing explanation or if this doesn't help.
kallem
Thanks Michael, you got me right
and after little bit of trying I understood what you meant and got things working. What I had forgotten was that elements can be bound to other elements..
But in the end I didn't need that as I did this using variables in scripts.
I had already tried script variables in the beginning but it had failed as the variables weren't updated correctly. The reason for this was that data set was initialized after columns were created. So lesson learnt in here is that dummy elements can be used to initialize data sets
mwilliams
Yes they can, and they can be very helpful at times!