-- Listing 9-1. Customizing the Title of the Filtered Employees Region
declare
    v_title varchar(100);
begin
    if :P28_JOB is not null and :P28_DEPTNO is not null
    then
          v_title := 'Job=' || :P28_JOB  || ' and Dept=' || :P28_DEPTNO;
    elsif :P28_JOB is not null then
          v_title := 'Job=' || :P28_JOB;
    elsif :P28_DEPTNO is not null then
          v_title := 'Dept=' || :P28_DEPTNO;
    else
          v_title := 'All Employees';
    end if;
    :P29_REGION_TITLE := 'Filter by ' ||  v_title;
end;

