You are on page 1of 6

9/2/13

Rep| 06| -31 Format Trigger

..
See other relevant topics

No relevant added yet. Give us sometime to get this right!

Format Trigger:-Format trigger is noting but displaying the output dynamically based on condition.
By using this we can hide or display the data based on condition.
It returns Boolean

For that we are going to create report based on EMP that, if SAL is less than 1500 then that employees
salary need not to display else to display the employees with their salary which will shown step by step
process.

newtonapples.com/oracle-reports-format-trigger/

2/9

9/2/13

Rep| 06| -31 Format Trigger

Here we are going to create report manually by using below query


SELECT empno,
Ename,
Sal,
Deptno,
Hiredate
From emp;

We already know how to build report manually.


So, for our purpose we are showing only data model and its layout which is shown below.

Its layout

newtonapples.com/oracle-reports-format-trigger/

3/9

9/2/13

Rep| 06| -31 Format Trigger

Here we are going to write piece of code in the SAL column.


For that give right click on SAL field and in that select PL/SQL Editor which is shown below

newtonapples.com/oracle-reports-format-trigger/

4/9

9/2/13

Rep| 06| -31 Format Trigger

Now we will get below window. There we have to write condition.

Here we want to display the employees whose salary is greater than 1500.
According to that we have to write PL/SQL code shown below.

newtonapples.com/oracle-reports-format-trigger/

5/9

9/2/13

Rep| 06| -31 Format Trigger

Now we are executing the report

Before that ones we will the employees whose salary is less than 1500.
For that
SELECT * FROM emp;

From the above output we can say that employees with empno 7654, 7844, 7900,7744,7746,7747
whose salary is less than or equal to 1500.
According to our report the employees whose salary is less than or equal to 1500 those employees salary
need not to display.
Lets check.
Execute the Report
We get the output shown below
newtonapples.com/oracle-reports-format-trigger/

6/9

9/2/13

Rep| 06| -31 Format Trigger

Here we can see that the employees whose salary is less than or equal to 1500 , those employees salary is
didnt displayed.
This can be achieved by using format trigger which is nothing but dynamically displaying the data based on
the condition
<< Report Triggers And Their Sequence
Report Registration>>
This post has been viewed 1764 times

About the Author: Venkat

(15 votes, average: 5.00 out of 5)


Loading ...
Disclaimer: Contents expressed in this post are viewpoints of independent authors/contributors and are not reviewed for correctness or accuracy by

newtonapples.com/oracle-reports-format-trigger/

7/9

You might also like