Activereports is removing the last subreport

261 views Asked by At

I have a subreport in the detail section of the report that is working for all but the last subreport on each page. When I use keepTogether on the detail section the last subreport just doesn't show up. When I turn keepTogether off it only shows what will fit on the page then throws the rest of it out.

What do I need to look for to fix this?

1

There are 1 answers

0
Jmaurier On BEST ANSWER

The comment by GrapeCity Team was right.

I was attaching the subreport in the FetchData event which has worked in other reports. I want to say the reason is because the previous reports I made were designed to fit on one page.

From the AR documentation: http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/Subreport.html

Coding best practices

Use the ReportStart event of the main report to create an instance of the report for your SubReport control, and then dispose of it in the ReportEnd event. This way, you are creating only one subreport instance when you run the main report.

In the Format event of the containing section, use the Report property of the SubReport control to attach a report object to the SubReport control.