Language:


Conditional Printing of Elements (Print Conditions)

This page describes using Print Conditions to determine whether information will be printed in forms.

---

When you add any element (e.g. a text element, line, frame, field or picture) to a Form Template, you can specify that it will only be printed if a particular condition is met. The condition will be that a specified field in the record being printed contains or does not contain a particular value. To do this, first create a record in the Print Conditions setting in the System module in which you have defined the condition, and then assign the Print Condition to the Form Template element.

The Print Condition record contains the following fields:

Code
Enter a unique Code for the Print Condition. The Code can consist of up to ten characters, and you can use both numbers and letters.

Comment
Enter a descriptive name for the Print Condition. This will be shown in the 'Print Conditions: Browse' window and the 'Paste Special' list and so should be clear enough to make the selection of the correct Print Condition easy for all users.

Position
A Print Condition is a test that a particular field in the record being printed contains or does not contain a specified value. As well as defining the test itself (which you will do using the Field, Operator and Parameter fields below), you should specify the Position of the test field, as follows:

Header
The test field is a header field (i.e. it is not a field in a matrix).

You can use a "Header" Print Condition in any element in a Form Template.

Current Row
The test field is a field in a matrix, and it will only be tested in the row currently being printed.

You can only use a "Current Row" Print Condition in a Field in which the Format is "Matrix" i.e. in a row field.

Any Row
The test field is a field in a matrix, and it will be tested in every row in the record currently being printed.

You can use an "Any Row" Print Condition in any element in a Form Template.

Some fields can exist both in the header of a record and in the matrix. For example, the Invoice, Order and Quotation records have Location and Tag/Object fields in the header and in the matrix. The Receipt and Payment records have Payment Mode fields in the header and in the matrix. Usually, if the field in a row is empty, the value in the header field will be used. For example, if the Location field in a row in an Invoice is empty, the row will use the Location specified in the header (the Item specified in the row will be taken from the Location specified in the header). However, Print Conditions do not have the fall-back to the header field. If the test field is Location and the Position is "Current Row" or "Any Row", only the Location field in the matrix will be tested.

It is possible to choose an illogical Position in a Print Condition. For example, in a Print Condition that will be used when printing Invoices, it is possible to specify that the test field is Item Code and the Position is "Header". This is illogical because Item Code only exists as a row field in Invoices. Such a Print Condition will be failed and the element depending on it will not be printed. Instead, an entry will be added to the log file (server log in server-client systems) as follows:
PRINTCOND Field not found register:position:field

For example:
PRINTCOND Field not found IVVc:h:ArtCode

where "h" signifies that the Position in the illogical Print Condition is "Header" and "r" signifies that the Position is "Current Row" or "Any Row".

Change Date
The Change Date will be updated automatically when you change any of the fields in the Print Condition record.

Field, Operator, Parameter
A Print Condition is a test that a particular field in the record being printed contains or does not contain a specified value. Use these fields to define the test (i.e. to specify the condition). You can use 'Paste Special' to specify the Field and the Operator.

For example, if you need a particular element to be printed on an Invoice if the TOTAL in the Invoice is greater than 100.00, enter Total Gross as the Field, > as the Operator and 100.00 as the Parameter (you should also choose "Header" as the Position because the TOTAL in an Invoice is a field in the header not the matrix). If you need the element to be printed if the Subtotal in the Invoice is less than 100.00, enter Total Net as the Field, < as the Operator and 100.00 as the Parameter (and again "Header" as the Position).

Use == as the Operator if the Field is to equal or match the Parameter, and <> if the Field is not to equal or match the Parameter. There is no need to specify a Parameter if the Operator is blank or not blank.

The following table connects the options that you can specify as the Field in a Print Condition record ("Option" column) with the fields in the records being printed that will be tested ("Field that is tested" column):

OptionPositionRecord being printedField that is tested
Comment/DescriptionHeaderAgreementComment ('Del. Terms' card)
ContractComment ('Del. Terms' card)
PaymentComment
RowAll with matrix with Description fieldDescription
PaymentText
ReceiptComment (flip H)
RecipeSpecification
Total NetHeaderAll with Subtotal fieldSubtotal
Hotel ReservationAgreed Price
Returned Goods to SupplierTOTAL
Total GrossHeaderAll with TOTAL field except Returned Goods to SupplierTOTAL
AssetPurch. Value
Credit AgreementTotal Sum
PaymentWithdrawn
ReceiptDeposited
Rental ReservationPeriodic Price ('Periodic Charges' card)
Reservation QuotationTotal for Agent
Service OrderOur Sales Price
Row SumRowAll with matrix with Sum fieldSum
Purchase InvoiceAmount
LocationHeaderAll with Location fieldLocation
Stock MovementFrom Location
Reservation QuotationRoom Location
RowAll with matrix with Location fieldLocation
Item CodeRowAll with matrix with Item fieldItem
Item GroupRowAll with matrix with Item fieldItem Group to which the Item belongs
Tag/ObjectHeaderAll with Tag/Object or Tags/Objects fieldTag/Object or Tags/Objects
RowAll with matrix with Tag/Object or Tags/Objects fieldTag/Object or Tags/Objects
DiscountHeaderRental Reservations% ('Periodic Charges' card)
RowAll with matrix with % field%
LanguageHeaderAll with Language fieldLanguage
ReasonHeaderInvoiceCredit Reason
Returned Goods to SupplierReason
RowBar TabVoid Reason
CountryHeaderDeliveryCountry ('Del. Address' card)
InvoiceCountry ('Inv. Address' card)
OrderCountry ('Inv. Address' card)
Tag NumberHeaderPOS InvoiceTag Number (used with Planet Tax in UAE)
Payment TermHeaderAll with Payment Terms fieldPayment Terms
Payment ModeHeaderAll with Payment Mode fieldPayment Mode
RowBar TabPayment Mode (this field is only in rows representing payments)
InvoicePayment Mode (this field is only in rows representing Cash and Credit Card Payments)
PaymentP. Mode (flip C)
POS InvoicePayment Mode (this field is only in rows representing payments)
ReceiptP. Mode (flip C)

As the table above suggests, you can only use Print Conditions in forms that print individual records, not in forms that print lists of records (e.g. statements).
After entering your Print Condition records, you should specify when they will be used. To do this, add or modify an element in a Form Template and use the Print Condition field:

An example use of Print Conditions might be to have figures printed in red if they are negative. To do this, add the field twice to the Form Template. In one of the fields, specify a Print Condition to say that the field should be printed if the value is greater than or equal to zero together with a Style that will print the figure in black. In the other field, the Print Condition should say that the field should be printed if the value is less than zero and the Style should print the figure in red. The two fields can have the same coordinates because it's not possible for both conditions to be passed so only one of them will be printed in an individual document:

---

The Form Template register in Standard ERP:

Go back to: