Email Us : sunilkumark11@gmail.com
Free Training > SQL PL / SQL Forms Reports Oracle Applications
< Previous Next >

 
Reports - Group Filters

Group Filter, is used to filter the records in the report.

We can filter the records in three types
1) First
2) Last
3) PL/SQL
Lets us understand the group filter with an example.

Ex:
Open the report builder tool,  
develop the report using report wizard using the query - select * from emp;
Save the report with the name GROUP_FILTER.rdf
This is how the report looks like, We get all the 14 records in the report output.

 

Go to Object Navigator ( F5 ),
Under Data Model Groups Select the group G_EMPNO

Right click on the group G_EMPNO, select Property Inspector
Filter type - change to First
No of Records - Change to 5

Close the Property Inspector. Save the report. Run the Report.
Observe, We get only first five records in the output.

Let's make few change to the report
Go to Object Navigator ( F5 ),
Under Data Model Groups Select the group G_EMPNO
Right click on the group G_EMPNO, select Property Inspector
Filter type - change to  Last
No of Records - Change to  3

Close the Property Inspector. Save the report. Run the Report.
Observe, We get only last three records in the output.

Let's make few change to the report
Go to Object Navigator ( F5 ),
Under Data Model Groups Select the group G_EMPNO
Right click on the group G_EMPNO, select Property Inspector
Filter type - change to  PL/SQL
In  PL/SQL  Filter , provide the following code.

function G_EMPNOGroupFilter return boolean is
begin
  if :comm is null then
                return (FALSE);
                else
  return (TRUE);
  end if;
end;

Click on compile.
Click on close.

 

The above code display's the records  which have comm.
Save the report. Run the Report.
Observe, We get only the records which have comm.

 

 

So, Group Filter is used to filter the records in the output.
We can Filter the records in three types. 1) First, 2) Last and 3) PL/SQL

 

 


< Previous Next >