Active Reports – Sub reports overlapping each other when rendered.

If you are like me and have a report that dynamically calls a sub report that then calls sub reports (using the sub report control), you may have run into the occasional sub report overlap nightmare. The latest encounter for me had to do with textboxes on the sub reports having properties of CAN GROW, MULTILINE, and WORD WRAP. Because these textboxes can grow, depending on whether these textboxes are populated with data less than 5 characters or many characters, overlapping the next sub report can occur.

With trial and error, I have found two solutions to the problem. You could even use both solutions to cover all bases. Before I get into explaining the solutions, let me give you more background on what I am trying to accomplish with these reports.

The image below represents a sub report that is called dynamically from the parent report. Based on my experience and knowledge (I could be wrong), sub reports cannot call sub reports dynamically. If they could, I would not have written this article and you most likely would not be reading it. Instead, I had to drag ten sub report controls to the surface of this sub report.

subreportflush

Notice how all the sub reports are flush to the left and bottom of the previous sub report (Well, except the last one for the purpose of presentation). This could potentially cause overlapping nightmares, especially if these reports have textboxes that CAN GROW.

Without going into the whys and how comes, I am simply going to offer my solutions.

The image below represents a small amount of padding I placed between each sub report control. The reason I have such a small amount of padding is because the white space will take up real estate on the rendered report and can look ugly if the gap is too big. This small gap is exactly what you need to fix the problem.

RENDER-ISSUE-01

Do you want double insurance? The second solution expounds on the first solution. The image below represents placing a line control (make it INVISIBLE) between each sub report in the gap we provided in the first solution. The line control ensures that the previous sub report renders completely.

RENDER-ISSUE-02

 

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *