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

Hiding Table Column at run time

1 Answer 295 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rehman
Top achievements
Rank 1
Rehman asked on 11 Mar 2013, 10:34 AM
I have reports already designed and working perfectly. Now the client requirements are bit changed. We need to hide a report column at the run time based on configurations. Obviously one workaround we already have is that we have 2 versions of the reports, one with the column and one without the column. Now as the number of reports increases, we can not afford to make the duplicates of each report. One version with the column  and the other version without this column.
Now our concern is find a way to SHOW/HIDE this column dynamically based on our configuration without disturbing the layout/design. Although there are multiple workarounds here on this forum but we can not do this because we already have designed and deployed these reports. Most of the workarounds would ultimately require us to re design the reports from the scratch. Of course we can not do that because this would doubles the effort and our client does not allow this.
What we want is that is there any way to SHOW/HIDE a table column of a report at run time and keeping the consistency (layout) of the reports intact? So if we shoe/hide a table column, is this space(width) will be adjusted automatically?
We are wondering if there is a solution in the latest release of telerik reporting..?

We appreciate any help regarding this,

Thanks

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 13 Mar 2013, 05:52 PM
Hi Rehman,

You can use ToggleVisibilityAction to show/hide a column group in a table.

In order to see all available groups in the Group explorer, you should enable Extended Mode. If the group is static and it doesn't appear in the Edit Toggle Visibility targets dialog, please set its Name property. 

You can find attached a simple report which uses the AdventureWorks database. The Checkbox's Action is ToggleVisiblity and it will hide the Table's second column. 
 

Regards,
Petio Petkov
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Rehman
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or