Question

Am facing a little trouble with active reports.. Mine is a report with 20-30 pages with titles and explanations. under each of the titles there is an image and after that the explanation comes. So this is like page by page continuously. So each of the pages contains multiples titles and explanations of that. THis is as on the detail section of my report.

But the issue is, in some pages title shows on the bottom of the page and the image and explanation getting moved to the next page since there is no space on that page after the title to accommodate image and explanation. So my question is, is that possible for me to move that part where title is almost at the edge of the pages to the new page. So that that title, image and explanation comes in new page which fixes that awkward feeling.

Requesting your kind attention since this is an emergency requirement in my project.

Thanks in advance

Was it helpful?

Solution

If all you're concerned about is that the title is getting split from the rest of the content you can set the KeepTogether property on your section to True, this will cause ActiveReports to try to place all of the content on the same page.

However, in this case you want to add a page break when the content for that section begins at an arbitrary point down on the page.

To do this, you can keep track of the section's top in relation to the page. If it's greater than a certain value, enable a pagebreak control, otherwise keep the pagebreak control disabled. ActiveReports 6 SP2 added the CurrentLocation property which can be used to get the location of the section on the page.

There's nothing built-in to handle this. you'd need to keep track of section heights in the BeforePrint events, incrementing a height counter of sorts.

OTHER TIPS

Can you add an extra level of grouping to your report, such that there's a group for each title? Then you can use the new page before/after property to ensure each title gets its own page? Possible downside would be that every title would then get a new page, which might not be what you want

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top