Skip to content

Conditionally control if a block is included or not

Reports can contain conditionally included parts, both single attributes and whole detail blocks can be omitted from the data.

First, the conditions need to be declared.

conditions {    condition ActorBiography default FALSE; }

Then it's value has to be set after each row fetch.

PL/SQL-Block {    BEGIN       :ActorBiography := (:ActorCount > 0);    END; }

Last, each optional attribute and/or aggregate is tagged.

aggregate ActorData[] Biography() conditionally ActorBiography;