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

Subreport showing on report when invisible

2 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jim Harris
Top achievements
Rank 1
Jim Harris asked on 31 Mar 2010, 02:32 PM
I have designed a report that makes use of a subreport in the detail section. I have parameters that drive my report that allows the detail section to be turned on or off. My assumption was that if the detail section is invisible or not displayed that all content contained within it would also be invisible.

When I run the report and do not show the detail section even though there is no content showing, the subreport is still causing space to be used and causes white space gaps between my group fields as if it is still trying to show the subreport.

Does anyone know what this issue may be?

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Apr 2010, 02:52 PM
Hi Jim Harris,

This behavior is by design - the section and panel item are container items and they would stretch to accommodate their children. However when an item is hidden, the containers are not resized as they are not aware of this change. To achieve this effect you need to set a very small value for the detail section height in the report constructor i.e.:

this.detail.Height = new Telerik.Reporting.Drawing.Unit(0.01, UnitType.Inch);

Greetings,
Steve
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.
0
Jim Harris
Top achievements
Rank 1
answered on 02 Apr 2010, 04:16 PM
Steve,

Thanks for the quick reply. I attempted to implement your suggestion by setting not only the Height of the detail section itself but also the Subreport component as well and this did not seem to have any better results than before. Is there any other way to somehow get this so that anything referenced in the detail section would follow the same guidelines if the detail section is turned off? This seems to me like it should already allow this.

Thanks,
Tags
General Discussions
Asked by
Jim Harris
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jim Harris
Top achievements
Rank 1
Share this question
or