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

Show / Hide chart depending on number of results returned. Reclaim empty space.

1 Answer 24 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 01 Dec 2010, 05:02 PM
I have a business requirement where I need to show or hide the chart if there are more then 5 records returned. When the chart is hidden I would like the rest of the report to move up and reclaim the space that the chart took up.

I have tried setting the height in code, binding to it, and using the dock / anchor pattern.

Can you give me any suggestions on how I can accomplish this.

Thanks

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Dec 2010, 05:55 PM
Hi Adam,

The Detail section cannot shrink, however it can grow. Thus our suggestion is to set the detail height to a small value as shown in the following code snippet. This will force the detail section to grow accordingly to the visible items .

public MasterReport1()
{
    //
    // Required for telerik Reporting designer support
    //
    InitializeComponent();
 
    this.detail.Height = Unit.Pixel(1);
}

Greetings,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or