If your requirement is of displaying a certain part of the template depending on some condition then the following example could be of help.
It is similar to IF condition.
Say the requirement is to display “No Data Found if the Report does not fetch any values” else it should display “End of Report”.
*****No Data Found*****
<?if:CF_COUNT != 0?>
*****End of Report*****
CF_COUNT is a formula column in the rdf returning the count of records returned.