I have a customizable rdlc report where the user can choose which columns to show. All the columns are included in the report designer, and I use parameters to hide/show columns based on the user's choice. The report renders correctly, and only shows the selected columns, HOWEVER, the overall width of the report is the same as if all the columns were visible. This means that the report can have a huge empty area to the right of the selected columns, which looks very silly.
So my question: Is there a way to adjust the report width dynamically at runtime to avoid a large silly empty area in the report? I attempted to do this in the designer by assigning a parameter to the width of the report body....but that was not allowed. The width cannot be an expression of any kind in the designer, only an actual value is allowed.
Any suggestions?
If it possible you can increase width of another column to fill empty space. I solved this problem as follows.
For example I have columns 'Name' and 'Discount'. Discount can be hidden and I should change Name.Width to Name.Width+Discount.Width.
I've made a new column (call it 'NameExt') right from 'Name' column with the same width as Discount.Width. Merged cells of 'Name' column and 'NameExt' column. Then set visibility rule for 'Discount' and inverse visibility rule for 'NameExt'.
Hope this can help.