Question

Is there any way to determine if a page has any content? I am running into a sporadic issue where in my 4-page report I will ocassionally get a blank detail section (header/footer displayed) before going on to the next page. I think it occurs because I have a sub-report on the 3rd page that might push down a little too far depending on its content.

Anyways, I was thinking if I could determine if the detail was empty, I might be able to supress its creation.

thoughts, ideas, suggestions?

Was it helpful?

Solution

There is no way to tell if that section is blank. However, what you're explaining shouldn't happen. Try setting the parent report's Detail section's KeepTogether to false. If it isn't absolutely necessary try setting the GroupKeepTogether property on the group header to false and see if that makes it go away.

The most common reason for a blank page is that the LeftMargin+PrintWidth+RightMargin > Actual Page Width

Make sure this isn't affecting you.

Finally, if you can manage to reproduce this consistently and send us a sample, post it on the ActiveReports support forum and one of us will help you get it resolved.

Scott Willeke
GrapeCity

OTHER TIPS

A hack that I've found that fixed a similar issue I was running into was to iterate over each section in the report and tell it to size to fit the contents.

foreach (Section section in this.Sections)
{
    section.SizeToFit(true);
}

This may or may not work for all scenarios and would probably not be advised by ActiveReports experts, but it did fix the issue I was running into.

I was able to fix the issue just by setting Detail Report visibility to false.

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