Crystal Report pagination problem-related skills

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.