In Crystal Report with the group sometimes it may happen that the summary group footer might appear on the following page while the details are displayed on the current page. In this article, we will show you how to solve this problem.
In such cases trick is to print the last row in the group footer section, which means at least one row always appears along with the group footer, then suppress the last row from the detail section. To do that follow these steps.
- Go to Group footer section.
- Copy all the fields from detail section and place them in the group footer. They should appear in the same report.
- Now run the report. You should see that last record appears twice in the report. Once in the detail section and once in the group footer section.
Now the trick is to Suppress the last record from the detail section. - Now select Detail Section.
- Right, Click and go to Section Expert.
- Select Suppress (No Drill-Down).
- Click on X-2 beside the Suppress button.
- Enter the following formula.recordnumber = count({ table.groupNamefield},{table.groupNamefield})Replace table.groupNamefiled with your report’s group name field
- Run the report and you will never see orphaned group footer.