1216554 - How to create fake page footers in subreports

SAP Knowledge Base Article - Public

1216554 - How to create fake page footers in subreports

Symptom

In Crystal Reports (CR), subreports do not contain page footers. How can you create a fake page footer for a subreport?

Resolution

To create fake page footers in subreports you need to insert and format a second Details section and a second Report Footer section. These sections will act as page footers.

Before You Begin

----------------

You must decide how many records you want per page. The number of records must be static, as must the fields. The 'Can Grow' option cannot be selected for any fields. It is also recommended that you have a static number of groups per page.

The following example creates ten records per page in the Details section without any groups.

Create Fake Page Footers in a Subreport

--------------------------------------

1. Right click the gray area to the left of the Details section and then click 'Insert Section Below'. You will now have a 'Details a' and a 'Details b' section.

2. On the 'Report' menu, click 'Section Expert'.

3. Click 'Details' (not 'Details a' or 'Details' b) and then click the 'X+2' button next to 'New Page After'. Insert the following formula in the 'Format Formula Editor':

Remainder(RecordNumber, 10) = 0

Click the 'Save and Close' button.

(This ensures the subreport will have 10 records per page. Change the second argument of the Remainder function in every formula to the number of records you want to see per page.)

4. In the Section Expert, click 'Details b' and then select the 'Print at Bottom of Page' check box. Then click the 'X+2' button next to 'Suppress (No Drill-Down)'. Insert the following formula in the 'Format Formula Editor':

Remainder(RecordNumber, 10) <> 0

Click the 'Save and Close' button.

(This makes the 'Details b' section appear at the bottom of each page, every tenth record.)

5. In the Section Expert, click 'Report Footer a' and then select the 'Print at Bottom of Page' check box. Then click the 'X+2' button next to Suppress (No Drill-Down). Enter the following formula in the 'Format Formula Editor':

Remainder(RecordNumber, 10) = 0

Click the 'Save and Close' button.

6. Click 'OK' to close the Section Expert.

7. Insert fields and other objects that you want in the fake page footer into both the 'Details a' and 'Report Footer a' sections. Format these two sections so that they are identical.

When the report is previewed, the subreport will have ten records per page with the 'Details b' section at the bottom of each page acting as the page footer. If the last page has less than ten records, the 'Report Footer a' section will act as the page footer instead.

More Information

----------------

To create fake page headers refer to knowledge base article c2005103 on our support site at:

http://support.crystaldecisions.com/search

The technique described in c2005103 is different than this article but both can be used together to create page headers and page footers in a subreport.

Keywords

SUB REPORT FOOTERS FALSE CREATE MAKE Crystal Reports Subreports have no page footers Section formatting , c2014229 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

SAP Crystal Reports 9.0