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

Selectively hiding detail row if field is blank

3 Answers 710 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 24 Dec 2010, 07:31 PM
I am generating a report in which i want to hide some row if it is blank. I am using conditional formatting. I have unchecked visible check-box. So it supposed to be hidden if condition match.
when i try to change the background color of the row, it works. But with the same condition if i try to hide the row (by unchecking VISIBLE checkbox) it do not hide the row.
Why is this happening.
I am using Telerik Reporting Version: 4.2.10.1130

Reply as soon as possible.

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Dec 2010, 12:24 PM
Hello Jay,

According to your explanation, it seems that you're using the Table item, thus you should be aware that it is built on a concept different than the regular grid components. While the grids are usually based on the rows and columns abstraction and display dynamic data by rows, the Telerik Reporting's Table item can display dynamic data by rows and/or columns that extends greatly the flexibility of the report.

The most important part of the Table item (the Table, the Crosstab and the List items are actually the same Table item with different initial settings) are the Row and Column group hierarchies. The groups in theRowGroups hierarchy define rules how the rows of the Table will be repeated, while the groups in theColumnGroups hierarchy are responsible for the columns. So the leaf groups in the RowGroups (leaf group has no child groups) defines the rows in the Table Body while the leaf column groups define the columns of the Table Body.

Depending on the grouping criteria, we have:

  • dynamic groups - have any Grouping expression, ex. group1.Grouping.Add(new Grouping("=Fields.Country")). For the dynamic groups, the corresponding row/column will repeat for every record of the grouped data.
  • static groups - no grouping criteria at all. For the static groups the corresponding row/column is rendered only once.
  • detail groups -have a single empty grouping, ex. group1.Grouping.Add(new Grouping()). Usually you have only one row -or- column detail group. For a detail group the corresponding row/column is repeated for every row of the Table's data source. You may think of the detail TableGroup as the Report's Detail section.
The problem in your case is that you want to hide a row group. Due to the data driven nature of the Table our suggestion is to set a Filter to the group itself. In order to inspect the groups our suggestion is to use the Group Explorer.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Soren
Top achievements
Rank 1
answered on 21 Oct 2015, 07:56 AM
Consider a dynamic group displaying the data in hierarchy. If there is ​some data in level 1 but no data at level 2 and level 3, but then there is again some data in level 4. Is it possible to hide those levels [level 2 & level 3]? If so, I have not yet found any possible way for doing that.
0
Stef
Telerik team
answered on 23 Oct 2015, 03:54 PM
Hello Soren,

The table item is a data-driven template. To hide a row it is enough to filter the data, and the table item's template will not be displayed for the filtered out records.

To filter the data you can use the Table.Filters collection, or a specific Table row group's Filters collection. To edit the filters of row groups, select the Table item and check the groups properties in the Group Explorer in Extended mode.

In case you are using nested Table items to produce the hierarchical visualization of data, to hide a data item without data, you can use the data item's NoDataMessage+NoDataStyle.Visible properties - How to: Set a No Data Message. Or use a conditional formatting setting the Visible property of the item.


In order to provide you more accurate suggestions, please open a support ticket and send us a demo project isolating the issue including a demo report and sample data.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Steve
Telerik team
Soren
Top achievements
Rank 1
Stef
Telerik team
Share this question
or