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

Can Telerik Reporting display/not display (based on code) a "panel" and "remove the white space" where that panel would be?

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
andy
Top achievements
Rank 1
andy asked on 05 Jul 2011, 03:12 PM

Can the Telerik Reporting create a report that will, per programming logic remove a "panel" of a report (with this "panel" containing information that is only displayed under certain circumstances):  This "inclusion" or "removal" would be based on c# code that creates logic based on data from the datasource's data value(s)?

Maybe what I refer to as a "panel" is a "sub report"...you can tell me in your lingo...

For example, there might be one section of a report that displays if the person is over age 65.  Otherwise, that section of the report is not displayed (and the vertical white space is closed to 0"--meaning there is no vertical white-space where this report information would have been displayed).

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Jul 2011, 04:47 PM
Hi Andy,

Telerik Reporting items/sections behavior is to keep the space they occupy no matter their child items visibility. As a workaround our suggestion is to set the section (detail) height to a very small value in code behind just after the InitializeComponent() is called in the report's constructor. As shown in the following code snippet. This will keep your design time intact and in the same time initially will shrink the report's detail section.

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

About conditionally setting the report items visibility our suggestion is to use bindings. The bindings provides link between properties of a report item and expressions. All the best,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
andy
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or