We have triggers in the report builder. A report trigger is a pl/sql block in which we can incorporate the business logic. If some input value failed according to the business rules then we can stop the process with out proceeding to the next step.
Always triggers returns a boolean. If it returs TRUE then the process takes the next step, if it returns FALSE then it stops the processing. So when a business rule gets failed you can return a FALSE after showing some message to the user using srw.message function.
This is handy to change the where clause, change the titles for the
report based on the user's choice of input. We can change the order by
clause based on user's selection in the parameter form. So at that time
we have to use triggres to manipulate the order by clause before running
the sql.
When you run a report it goes through the following processes.
Before Parameter Form - Mostly you wont use this trigger.
After Parameter Form --We use this trigger quite often
Before Report --This is the most used trigger while developing reports.
Between Pages -- We may never use this trigger
After Report -- You may use this trigger if you are doing
some DML operations to keep track of who ran this report etc etc for the
audit purposes.