Home » Developer & Programmer » Reports & Discoverer » Oracle report (Oracle report 10g)
Oracle report [message #288564] Tue, 18 December 2007 00:45 Go to next message
payazal
Messages: 8
Registered: October 2007
Location: KL
Junior Member

Hello everyone,

I am faizal and i'm new in oracle report. I want linking from one report to other report. I using srw.run_server(arg) in afterPform trigger. there are no error when compile it. but there error when running it. below is the coding.

function AfterPForm return boolean is
temp varchar(100);
begin
:kod_mula := upper(:kod_mula);
:kod_akhir := upper(:kod_akhir);

if :p_act = 1 then srw.run_report('
server=REP_ESPKB_10G report=Pesanan_Tempatan.rdf paramform=no destype=cache desformat=pdf kod_mula=' || :kod_mula || ' kod_akhir=' || :kod_akhir);
end if;

exception
when SRW.RUN_REPORT_FAILURE then
tmp := srw.geterr_run;
srw.message(1000, tmp);
return (TRUE);
end;

thanks

Re: Oracle report [message #288575 is a reply to message #288564] Tue, 18 December 2007 01:28 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

but there error when running it

Which error?
Re: Oracle report [message #288618 is a reply to message #288575] Tue, 18 December 2007 03:37 Go to previous messageGo to next message
payazal
Messages: 8
Registered: October 2007
Location: KL
Junior Member

when running in oracle report, the error message appear is

can not connect to report server

after i put in the server, the error message is

REP-771: 'afterpform': Fatal PL/SQL error occurred.
ORA-06503: PL/SQL: Function returned without value



Re: Oracle report [message #288635 is a reply to message #288618] Tue, 18 December 2007 04:06 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
payazal wrote on Tue, 18 December 2007 10:37

ORA-06503: PL/SQL: Function returned without value

Yes, it does - in the case everything was fine. The function should have a RETURN, and yours doesn't have it (except in the EXCEPTION handler section).

Rewrite it as
if :p_act = 1 
then 
   srw.run_report('server=REP_ESPKB_10G ...);
end if;

RETURN (TRUE);

EXCEPTION 
   ...

By the way, what will you do when ':p_act <> 1'? Don't you need ELSE as well?
Re: link to other report in oracle report [message #288848 is a reply to message #288635] Tue, 18 December 2007 22:25 Go to previous message
payazal
Messages: 8
Registered: October 2007
Location: KL
Junior Member

I try to modified the trigger but same error still appear.

function AfterPForm return boolean is
temp varchar(100);
begin
:kod_mula := upper(:kod_mula);
:kod_akhir := upper(:kod_akhir);

if :p_act = 1 then
srw.run_report('server=REP_ESPKB_10G report=Pesanan_Tempatan.rdf paramform=no destype=cache desformat=pdf kod_mula=' || :kod_mula || ' kod_akhir=' || :kod_akhir);
end if;
return (TRUE);

exception
when SRW.RUN_REPORT_FAILURE then
tmp := srw.geterr_run;
srw.message(1000, tmp);

end;

Ye this report will be link to other report but i just test to one report first.

Previous Topic: Dynamically Changing Labels in Discoverer
Next Topic: Discoverer against readonly database
Goto Forum:
  


Current Time: Wed Jul 03 01:52:45 CDT 2024