Hi @Mario Formosa ,
When you hide/show the report through parameters, the column width is usually fixed, and the column width cannot be set by expression. But I have a way that works well to resolve your issue. You could set the dynamic column width by inserting a chart in the row.
The following is my test:
- I have the following table. I set the column visibility to hide the Sales column when Rank<=3, and display the Sales column when Rank>3.
- Insert a row at the bottom of the table, insert a chart in each column, refer to the figure above. Then change the DynamicWidth of the Rank column and Employee ID column to an expression similar to the following
=iif(Fields!Rank.Value<=3, "12cm", "6cm")
, and change its DynamicHeight to "0cm", You can set the value of DynamicWidth according to your needs.
- Set the hidden Sales column, change DynamicWidth to the expression of
=IIF(Fields!Rank.Value<=3,"0cm","6cm")
, and change its DynamicHeight to "0cm", where "6cm" "It can be replaced according to your needs. - Preview the report
We can see that the column width has changed according to the hide/show of the column.
Hope this helps.
Best Regards,
Joy
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.