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

Crosstab hiding columns after binding

1 Answer 278 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian Ho
Top achievements
Rank 1
Brian Ho asked on 11 Mar 2010, 09:08 PM
Hi,
I'm trying to create a report that's very similar to the Crosstab example in the Telerik Reporting demo.  (Please refer to that demo) Except that what I need to do is I want to hide Quarter columns for lets say year 2001, 2002, 2003 and only show the Totals columns for those years.  For the 2004 grouping it should not hide the Quarter columns.  I tried to set the hide each textbox in the ItemDataBound event by setting Visible=false on all the textboxes for that those years but it's not working.  Does anyone know how to do it?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 16 Mar 2010, 01:06 PM
Hi Brian Ho,

The Crosstab (also Table and List report items) depend on the data and thus visibility of columns/rows can be controlled by their presence. To illustrate the approach I will use the ProductSales report from our examples. The steps are:
  1. Open the report in the designer and show the Group explorer (see GroupExplorer.png)
  2. Define new Report Parameter DetailsForYear as shown on ReportParameter.png. Use the same DataSource as for the report. The parameter should be MultiValue parameter.
  3. Select the Crosstab (or any cell in it) and invoke the Edit Filter dialog for the Qtr Column group. Enter the filter expression as shown on SetFilter.png.
  4. Preview the report - see the Preview.png. Now it is possible to select for which year to show Quarter columns and hide it for the rest.

 The same can be used for the row dynamic(autogenerated) groups such as ProductSubCategory.

Kind regards,
Hrisi
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Brian Ho
Top achievements
Rank 1
Answers by
Hrisi
Telerik team
Share this question
or