This is a migrated thread and some comments may be shown as answers.

Hide table row

2 Answers 256 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kamel
Top achievements
Rank 1
Kamel asked on 16 Jan 2012, 04:37 PM
Hello

My report contains a group. The GroupFooterSection is bound with the last item of the group through a filter. The group footer section contains a table with 2 lines.
In some cases -based on a field value- I want to hide the second row. My problem is: 
    -I'm able to hide the content of the second row, but not the second row itself which is a panel: setting 'Style.Visible' to 'false' through Bindings has no effect
    -the space occupied by the hidden row is left blank while I want it to be schrinked.
I tried to add some conditionnal formatting on the table and section in order to decrease the height of the overall section, but without any success.

Is there a way to schrink the place left empty by the hidden row?

Thanks for any answer & suggestion

greg

2 Answers, 1 is accepted

Sort by
0
Accepted
Hadib Ahmabi
Top achievements
Rank 1
answered on 17 Jan 2012, 07:48 AM
//you have to set all the items in the row, including the row itself, to a very small height. However it should NOT be =0!!!
//the panel that is inside the row
panel.Height = Unit.Inch(0.001);
//if the row has more than one cell, you have to do it for each cell
  
//then the row itself
table.Body.Rows[1] = new TableBodyRow(Unit.Inch(0.001));
0
Kamel
Top achievements
Rank 1
answered on 20 Jan 2012, 02:51 PM
Thanks Adib

I also discovered that some rows that were supposed to be removed were actually blank due to an issue in my bindings.
Setting temporarily a background color to the different parts of the table was a good thing to define which part of a report is leading to a loss of space.

greg
Tags
General Discussions
Asked by
Kamel
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Kamel
Top achievements
Rank 1
Share this question
or