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

Completely hide a crosstab with the empty data source

2 Answers 218 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nikolay
Top achievements
Rank 1
Nikolay asked on 25 Jan 2012, 06:37 PM
I apologize in advance if the question was asked earlier (although I looked through the forum).
I need to completely hide the crosstab when its data source contains no records. All report controls located below should be shifted up on the page. Currently the crosstab header and footer rows are shown when no data is present. I tried to set CanShrink = true for all cells in the crosstab and use the conditional formatting (font size = 0 pt) but anyway the other report controls are on their places, not shifted up.

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 26 Jan 2012, 10:39 AM
Hi Nikolay,

The easiest way to achieve your requirement is to set a Binding for a table "header" Textbox.

 Property Path Expression 
 Parent.Visible  =IIF(Count(1)>0, True, False)

Check out the attached sample report that illustrates the suggested approach.

About shifting the items up when you hide an item, please review the Design Considerations for Report Item Layout help article for more info.

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Nikolay
Top achievements
Rank 1
answered on 26 Jan 2012, 04:10 PM
Thank you, Steve. Bindings really works, although it is not an obvious solution :)
Tags
General Discussions
Asked by
Nikolay
Top achievements
Rank 1
Answers by
Steve
Telerik team
Nikolay
Top achievements
Rank 1
Share this question
or