Crystal Report Pagination Summary
Build three formula fields, the first (Formula 1) Enter the following formula:
Whileprintingrecords;
Global Numbervar ptotal;
ptotal:=0;
The second (Formula 2) enters the following formula:
Whileprintingrecords;
Global Numbervar ptotal;
Ptotal: = ptotal + [field to summarize];
If the field you want to summarize is not a number, use the Tonumber () function to convert it;
The third (Formula 3) enters the following formula:
Whileprintingrecords;
Global Numbervar ptotal;
Put Formula 1 in the header, Formula 2 in the details, and hide the Formula 1 and Formula 2; put the Formula 3 in the footer, format Formula 3, set to the format you want to display. That's fine.
Crystal Report pagination and automatically insert blank lines
In the forum will often see the Crystal Report page paging problem, this very good solution.
But the question of automatically inserting blank lines has not been very well answered,
After the study found a flexible way to achieve.
' Paging
Dot format section on details, new page on back page tick
Enter the formula:
If Onlastrecord Then
FORMULA = FALSE
Else
If recordnumber MoD 5 =0 Then
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
' (BASIC syntax)
---------------------------------------------------------------------
Insufficient last page to fill with blank line:
Add a blank detail row, format this section, check for suppressed display (no drill-down)
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 1) Then ' first, 1
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
' (BASIC syntax)
... Then the second [Add a blank detail row, format This section, tick the suppressed display (no drill-down)]:
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 2) Then ' second, 2
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
... Then the third [Add a blank detail row, format This section, tick the suppressed display (no drill-down)]:
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 3) Then ' third, 3
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
In the forum will often see the Crystal Report page paging problem, this very good solution.
But the question of automatically inserting blank lines has not been very well answered,
After the study found a flexible way to achieve.
' Paging
Dot format section on details, new page on back page tick
Enter the formula:
If Onlastrecord Then
FORMULA = FALSE
Else
If recordnumber MoD 5 =0 Then
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
' (BASIC syntax)
---------------------------------------------------------------------
Insufficient last page to fill with blank line:
Add a blank detail row, format this section, check for suppressed display (no drill-down)
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 1) Then ' first, 1
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
' (BASIC syntax)
... Then the second [Add a blank detail row, format This section, tick the suppressed display (no drill-down)]:
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 2) Then ' second, 2
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
... Then the third [Add a blank detail row, format This section, tick the suppressed display (no drill-down)]:
Enter the formula:
If not Onlastrecord then
FORMULA = TRUE
Else
if (recordnumber MoD 5 <= 3) Then ' third, 3
FORMULA = TRUE
Else
FORMULA = FALSE
End If
End If
... (Fourth, the last 5-1)
(Note: This method is suitable for fewer rows, the above is 5 behavior, but do not feel trouble, the number of rows can also be used) ... (Fourth, the last 5-1)