vc chama a procedure e depois o report
PROCEDURE CALL_REPORT IS
pl_id PARAMLIST;
BEGIN
pl_id := Get_Parameter_List(‘tmpdata’);
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List(‘tmpdata’);
Add_Parameter(pl_id,’DATEON’,TEXT_PARAMETER,:REPORT.DATE_FROM);
Add_Parameter(pl_id,’DATETO’,TEXT_PARAMETER,:REPORT.DATE_TO);
Add_Parameter(pl_id,’PROJECT_CODE’,TEXT_PARAMETER,:REPORT.PROJECT_CODE);
ADD_PARAMETER(PL_ID,’LEDGER_NAME’,TEXT_PARAMETER,:REPORT.LEDGER_NAME);
ADD_PARAMETER(PL_ID,’VOUCHER_DATE1′,TEXT_PARAMETER,:REPORT.DATE_FROM);
Add_Parameter(pl_id, ‘PARAMFORM’, TEXT_PARAMETER, ‘NO’);
Run_Product(REPORTS, ‘RPT_NLEDGER’, SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
END;