Sample script for empty or blank lines added when the crystal report prints documents

Source: Internet
Author: User

Assume that each document prints a total of five lines, a maximum of four lines are added,
Define four blank sections in the repeated table bodies.
The primary task is to determine when and when the four sections are displayed based on the number of records.
The suppression display script of the defined section is:
Section 1. The first blank section must be displayed only when the number of records is equal to 1.
If onlastrecord = false then
Formula = true
Else

If (count ({sales order table body. Product Code}) mod 5> 1) then
Formula = true
Else
If (count ({sales single table body. Product Code}) mod 5 = 0) then
Formula = true
Else
Formula = false
End if
End if
End if

Section 2: the second blank section must be displayed only when the number of records is equal to 1 or 2.
If onlastrecord = false then
Formula = true
Else
If (count ({sales order table body. Product Code}) mod 5> 2) then
Formula = true
Else
If (count ({sales single table body. Product Code}) mod 5 = 0) then
Formula = true
Else
Formula = false
End if
End if
End if

The other two sections are very simple.
Note that the demarcation condition is processing when 0 is returned and the number of records is zero after the modulo operation is fully calculated.

Copyright Disclaimer: csdn is the hosting service provider of this blog. If this article involves copyright issues, csdn does not assume relevant responsibilities. Ask the copyright owner to contact the author directly.

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.