Hi All,
I Have a one procedure that generating a report in html table format.
I need a help that procedure is giving a 500 records. we need to restrict data per page 50 rows and print like pagination format.
below are the procedure details
create or replace procedure P_R_EMP_REPORT
(
IN_EMPID VARCHAR2 DEFAULT NULL)
is
cursor EMP_details
is
SELECT ENAME,SAL
FROM EMP
WHERE ( EMPNO = IN_EMPID);
begin
htp.header(4, ' EMP Details');
FOR rec IN EMP_details
LOOP
IF EMP_details%ROWCOUNT = 1
THEN
HTP.tableOpen ('Border=1 CellSpacing=0 CellPadding=0');
HTP.tableRowOpen;
HTP.tableheader ('ENAME');
HTP.tableheader ('SAL');
END IF;
END LOOP;
FOR rec IN EMP_details
LOOP
HTP.tableRowOpen;
HTP.tabledata (rec.ENAME);
HTP.tabledata (rec.SAL);
HTP.tableRowClose;
end loop;
HTP.tableClose;
HTP.formClose;
EXCEPTION
WHEN OTHERS THEN
HTP.header (5, SQLERRM);
END;