This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||
|
4D v20 R7
An example report
|
Label | Explanation | Effect |
H | Header area | Printed once at the top of each page |
H1 | L1 Header area | Printed once before each level 1 Break |
H2 | L2 Header area | Printed once before each level 2 Break |
D | Detail area | Printed once for each record in the selection |
B2 | L2 Break area | Printed once at each level 2 Break (when the value in the second Sorted field changes) |
B1 | L1 Break area | Printed once at each level 1 Break (when the value in the first Sorted field changes) |
B0 | L0 Break area | Printed once at the end of the report |
F | Footer area | Printed once at the bottom of each page |
The non-enterable objects that are placed in the Header, Break, and Footer areas are controlled by object methods.
Note: The following code can be used only in object and form methods. It cannot be used in project methods.
The date is drawn from the system date by placing a non-enterable object named vDate in the Header area with this method:
vDate:=Current date
The time is drawn from the system clock by placing a non-enterable object named vTime in the Header area with this method:
vTime:=Current time
The subtotal for sales in the level 2 Break area is calculated and displayed in an object named vSalesProd with the following method:
vSalesProd:=Subtotal(Sales)
The subtotal for sales in the level 1 Break area is calculated and displayed in an object named vSalesCust with the following method:
vSalesCust:=Subtotal(Sales)
The total for sales in the level 0 Break area is calculated and displayed in an object named vSalesTotal with the following method:
vSalesTotal:=Subtotal(Sales)
Note that even though all three objects use the same calculation, they produce different results. Because they are placed in different Break areas, they are executed at different times and perform their calculations for different groups of records. For an explanation of Break levels, see the “Using breaks” section in Forms for printed reports.
vPage:="Page "+String(FORM Get current page)
The FORM Get current page function returns the page number.
Product: 4D
Theme: Output forms and reports
4D Design Reference ( 4D v20 R7)