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

subreport margin problem

5 Answers 661 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lior ef
Top achievements
Rank 1
Lior ef asked on 03 Aug 2010, 12:43 PM
hi guys,

here is my problem:
i have a Master report with some fields on it, and a couple of subreports.
they are all aligned to the right in design time as shown in "report in designer" attached picture.
(manually aligned with the designer grid lines)
at runtime all of the subreports are a little intended to the right of the fields as you can see in the second attached
picture "subreport margin problem2" (in the picture - 1 and 3 are subreports. 2 and 4 are fields on the Master report)

i tried making the subreports a little wider to the right - it didn't help.

i'm working with the latest internal build of reporting (4.1.10.729). radcontrols for wpf version: 2010.2.714.35
on visual studio 2008

any suggestions?

thanks.

5 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 06 Aug 2010, 10:01 AM
Hi Lior ef,

When a report is embedded in another report, its width depends not on the size of the hosting Subreport item but on its width set through the Telerik.Reporting.Report.Width property.

On the other hand, when it is a top-level report its width depends on the Width property, PageSettings and the format the report is rendered into. For more information please see Design Considerations for Report Rendering.

So in your case try increasing the nested reports' widths instead of the Subreport items. Subreport items server as placeholders only and defines the location where the inner report will appear while the size depends entirely on the nested report.

All the best,
Svetoslav
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
Lior ef
Top achievements
Rank 1
answered on 08 Aug 2010, 02:41 PM
hi Svetoslav,

thanks for the reply.
according to what you are telling me, i should manually enlarge the subreport width in runtime?
can't i configure something at design time to do that? it looks to me as if this is a common functionality needed from a subreport,
i really think that if i design a subreport the user doesn't need to see any visual changes, so why does the subreport gets a different width from the subreport item container?

besides that, if the solution is really changing the width at runtime - how do i do that?
i tried writing this code at the c'tor of the master report:
SubreportItemContainer.Width = this.Width;
SubreportItemContainer.Report.Width = this.Width;
"this" is the Master report.

it didn't work.

thanks in advance.
0
Steve
Telerik team
answered on 12 Aug 2010, 10:01 AM
Hi Lior ef,

My colleague referred to Telerik.Reporting.Report.Width property which is a definition property and not processing one, meaning you should alter the width through the report designer the same way you have tried to do by increasing the subreport item width.
Also, you've misunderstood the previous explanation - the subreport item is a container only and it accommodates its child (in this case a report). The width/height of the subreport item is irrelevant, even if you set it to Width 1px and Height 1px, it would still stretch to the height and width of the actual report that is hosted in the subreport item.

Sincerely yours,
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
Abdullah
Top achievements
Rank 1
answered on 04 Jan 2021, 02:47 PM

Hi,

I have a report that created on a report designer and I use report viewer to show the report using C#.

The white space issue appear in the right of report but the issue doesn't appear in another devices,  the report designer and code used as same in the two devices but the issue appear in device and doesn't in the second.

please check the attachments.

0
Todor
Telerik team
answered on 07 Jan 2021, 08:21 AM

Hello Abdullah,

The issue may be related to DPI awareness. Check the following resources for details:

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Lior ef
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Lior ef
Top achievements
Rank 1
Steve
Telerik team
Abdullah
Top achievements
Rank 1
Todor
Telerik team
Share this question
or