Conditional Sections Most generic directive for using conditional sections is “if”. For marking end of the conditional section use “/if”. Remember, this is paired directive, consisting of two containers and section between them. If we want to print conditional text if the the partner is Customer, the directive would look:  Here we can see paired directive, so you have to place two separate containers, one for the opening part of directive (if=”objects[0].customer”), the other for closing part (/if). All that is between them will be placed on final document, when check-box named “Customer” on Partner object is marked. Loop Sections Now when we want to report on several objects, we have create loop for each object in the list. For this task paired “for” directive is being used. Paired – means, one container for opening, another container for closing. Remember example from Conditional Sections chapter. We will modify it to report all the customer names, from all selected partners.  Please notice paired for directive with embedded conditional, if directive inside. Variable one_partner has been introduced, to hold temporary reference to each partner in objects list.
|