Problems with Subreports

Stimulsoft Reports.NET discussion
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Problems with Subreports

Post by MatthiasU »

Hello,

I have several problems using subreports.

1) Child band of header bands are not repeated on following pages, when template is used as subreport. It works fine, when printing the template directly.
2) The size of the module will not be considered when used as subreport. The heigt of the module will grow to the height of the subreport component.
3) On second and all following pages, the module will be printed outside the subreport component bounds.

Please see the attachement for a simplified sample. (You have to adjust the path of the template used for the subreport component.)


Thanks & Regards,
Matthias
Attachments
ReportWithSubreport.mrt
(3.57 KiB) Downloaded 377 times
Module.mrt
(5.32 KiB) Downloaded 364 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problems with Subreports

Post by HighAley »

Hello.

The sub-report is rendered on a page with unlimited height, because it's impossible to know the end size of the sub-report component.
Please, try to use the Panel and put all components form sub-report on it.

Thank you.
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

Hello,

no, on the first page, the size of sub-report component is considered correctly...

Regards,
Matthias
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

OK, when I deactivate the StiOptions.Engine.RenderExternalSubReportsWithHelpOfUnlimitedHeightPages setting, then the sub-report will be printed in the rectangle of the sub-report component.

But the "pages" are based on the height of the linked sub-report pages. If I set the height of the linked sub-report to the height of the component, everything work fine. Can't you add an option to apply the height of sub-report component to linked sub-report before rendering?


Thanks & Regards,
Matthias
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problems with Subreports

Post by HighAley »

Hello, Matthias.

The size of sub-report is ignored in our product.
It is rendered with width of the sub-report component of the main report.
Unfortunately, we can't change this behavior.

Thank you.
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

Hello,

sorry for asking agian...

In your external sub-report render method, it would be very nice, if you can add a option to take the page size (height) for the external report from the subreport. Currently, you set the properties UnlimitedPageHeight, UnlimitedBreakable and Height for all pages of the external report when StiOptions.Engine.RenderExternalSubReportsWithHelpOfUnlimitedHeightPages is set.

My proposal would be: new engine options for the case StiOptions.Engine.RenderExternalSubReportsWithHelpOfUnlimitedHeightPages is NOT set.
- RenderExternalSubReportsWithAdjustedPageHeight: Height of all pages of external report (compiled report) will be set to height of subreport
- RenderExternalSubReportsWithoutMargins: Margins of all pages of external report (compiled report) will be set to 0

I would be very grateful, if you could consider my proposal :)


Many Thanks & Regards,
Matthias
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

Hello,

I have tested this behaviour with an older Release (2016.1). The behaviour has been changed!!! In the old release, the height of the subreport has been considered!
But in the old release, the header, which should repeat on every page, has been shown only on the first page...

Regards,
Matthias
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

Hello,

we have solved the issues :)

We adjust the subreport pages sizes in the event StiOptions.Engine.GlobalEvents.ReportGetSubReport and set StiOptions.Engine.RenderExternalSubReportsWithHelpOfUnlimitedHeightPages = false.

But we have found a further issue with the borders of bands. The borders are printed only on the first page. All following pages don't show any borders for bands.

Can you please fix this small issue :)


Many Thanks & Regards,
Matthias
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problems with Subreports

Post by HighAley »

Hello, Matthias.

Please, send us a report template with sample data that reproduces the issue with borders.

Thank you.
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Problems with Subreports

Post by MatthiasU »

Hello,

this issue occurs only with an older Release (2016.1). With the latest release (2016.1.19), we have the problem that the component area is ignored. Please see attachment.


Regards,
Matthias
Attachments
issue_2016_1_19.png
issue_2016_1_19.png (67.78 KiB) Viewed 5979 times
ReportWithSubreport.mrt
(3.46 KiB) Downloaded 436 times
Module.mrt
(5.49 KiB) Downloaded 282 times
Post Reply