Page breaking, KeepTogether and overlaping of controls


02-24-2010, 9:48 PM
HI,

I am having problems with page breaking. I attached the source code to show what I am facing with. There are two samples - two buttons to press.

In the first example I am wondering why the child subreport (with CHILD REPORT labels) do not print enirely despite of the fact tha I have KeepTogether set to true for the Detail section of that subreport (child subreport). This example is very static.

In the second example I am wondering why the controls overlap. This example is more dynamic. One of the main report controls is populated dynamicaly with sequence numbers printed in separate lines, but the rest is simmilar as in the first example (KeepTogether is set to true for the child subreport).


Please advise, what is wrong with these examples. Why don't the work? The examples are pretty simple so I expect clear answer how to make it work.

Thank you.
Regards,
Marcin

Re: Page breaking, KeepTogether and overlaping of controls


02-26-2010, 6:07 AM
Marcin,

I was able to observe the issue that you mention using ActiveReports for .NET 2.0. However, I would like to inform that I was not able to observe this using our latest product using ActiveReports 6. You may want to upgrade to the same. You may find the trial version here. The reports that you have created in ActiveReports for .NET 2.0 can be upgraded into ActiveReports 6 as well.

Regarding the issue in ActiveReports for .NET 2.0, please allow me sometime to investigate and if possible find a workaround. However, I would like to inform that if we recognize this as a bug, we would not be able to provide a solution as ActiveReports 2.0 for .NET is no longer in production.

Regards,
Prantik

Re: Page breaking, KeepTogether and overlaping of controls


03-01-2010, 2:17 PM
Marcin,

Please take a look at the attached sample, where I have modified the code a little bit. Run the second example and you will observe that there is no overlapping now.

I was not able to understand what do you mean by “the child subreport (with CHILD REPORT labels) do not print entirely”. I observe that the child1-10 appears correctly on the same. Are you expecting them to remain on the same page? I would like to inform you that this wont be possible because subreports are not rendered as pages rather as a continuous canvas and would ignore settings such as keeptogether.

Regards,
Prantik

Re: Page breaking, KeepTogether and overlaping of controls


03-01-2010, 5:53 PM
Prantik,

As for the first example, I would like the subreport (with CHILD REPORT labels) being printed entirely on a page. So in this particular example, I would like it to be printed on the second page, becaues it does not fit entirely on the first page. I do not want any contens of that subreport being broken accros the pages.

As for the second example, I would like to make the example work without the need to do some tricky template modification. If I have correctly noticed, you have moved one of the control down a little bit. Why? Is there any rison to do so? Is there any logic to determine which control should be moved and where? If yes, I can introduce that logic in my reports, but if no, how can I make 'all similar' reports work?


Thank you.

Regards,
Marcin

Re: Page breaking, KeepTogether and overlaping of controls


03-02-2010, 10:40 AM
Marcin,

The subreport controls are not page aware. So, it might not be easy to keep the contents of the subreport in a single page of the main report. You could however insert a pagebreak control before the subreport control in parentreport2 so that the subreport goes to the next page.

Regarding your second issue, I am investigating further and would let you know of my observations soon. Thank you for keeping your patience.

Regards,
Prantik

Re: Page breaking, KeepTogether and overlaping of controls


03-03-2010, 11:58 PM
As for the first example, I would like to achieve the following behaviour... Client can customize the report, can change paper size, margins and main report contents. Then, if the subreport fits entirely on the first page, let it be printed on the first page, but if it does not fit entirely on the first page, let it be moved and be printed on the second page. I am preatty sure that keeping-together of subreport contents should be somehow possible in AR. I cannot insert page-break because I can not easily calculate if it is needed or not.

As for the second example I still can not find out what the reason could be, that such a simple example results in overlapping.

Re: Page breaking, KeepTogether and overlaping of controls


03-05-2010, 12:01 PM
Hello,

For the first issue you could try something like this.

1)    Run the subreport separately. During this, sum the height of each control rendered (sum_height_controls_subreport)
2)    In the main report, add a page break before the subreport and set its enabled property to false.
3)    Now while running the main report sum the height of all the controls prior to the subreport (sum_height_controls_mainreport) in a page (make it 0 at pagestart ).
4)    If the sum_height_controls_mainreport+ sum_height_controls_subreport > pageheight : set the enabled property of the subreport to true. Else set it to false.

Regarding the second issue, I was unable to replicate this in ActiveReports6. The trial version can be downloaded from here.

Regards,
Prantik