Link to home
Start Free TrialLog in
Avatar of anilsharma
anilsharma

asked on

How to force page break based on some condition.

I have data like
sno  descrip     amount  page_skip
----------------------------------
1    aaaaaaa      4000    n
2    bbbbbbbb       30    N
3    c              10    N
4    d              40    Y
5    f              50    B
6    dddddu        100    C


I want to give a page break when Page_Skip='Y'
Avatar of M-Ali
M-Ali

I assume you are using oracle report builder. This is how you can achieve this:

1)Design your report layout.
2)Just below the "page_skip" column, create a small object (like a line) within the same repeating frame.
3)Set "page break before" property for this object
4)Create format trigger on this object like:
function B_1FormatTrigger return boolean is
begin
  if :page_skip = 'Y' Then
    return (TRUE);
  else
    return false;
  end if;
end;

You can set the color of the object to white to prevent it from being printed.

HTH

Ali
Avatar of anilsharma

ASKER

Good solution.
ASKER CERTIFIED SOLUTION
Avatar of M-Ali
M-Ali

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial