Home » Developer & Programmer » Reports & Discoverer » REP-0738: only a function allowed here
REP-0738: only a function allowed here [message #456488] Tue, 18 May 2010 02:59 Go to next message
mahajneh
Messages: 16
Registered: May 2010
Junior Member
hello evreybody

am trying to write a function at beforereport

function BeforePForm return boolean is
vc_parameter_form varchar2(4000);
vc_hidden_runtime_values varchar2(1000);
vc_report_name varchar2(100);
begin
If (:p_action='_action_') then
vc_hidden_runtime_values:='_hidden_';
else

swr.get_report_name=(vc_report_name);
vc_report_name:=substr(vc_report_name,1,instr (vc_report_name,' ')-1);
vc_hidden_runtime_values:='report='||vc_report_name||
'&destype='||:destype||'&desformat='||:desformat||'
&userid='||:p_user_connect||'&server='||:p_servername;
end if;
vc_parameter_form:='<html><body bgcolor="#ffffff"><form method=post
action="'||:P_ACTION||'"><input name="hidden_run_parameters" type=hidden
value="'||vc_hidden_runtime_values||'"><center><p><table border=0 cellspacing=0
cellpadding=0><tr><td><input type=submit></td><td> width=15><td><input
type=reset></td></tr></table><p><hr><p>';
srw.set_before_form_html (srw.text_escape, vc_parameter_form);

return(true);
end;



but when I compile this code I get the error
REP-0738: only a function allowed here

any help please
thanx in advance
Re: REP-0738: only a function allowed here [message #456495 is a reply to message #456488] Tue, 18 May 2010 03:08 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What a mess! Why don't you format code?

This seems to be a culprit:
swr.get_report_name=(vc_report_name);
Re: REP-0738: only a function allowed here [message #456510 is a reply to message #456495] Tue, 18 May 2010 03:40 Go to previous messageGo to next message
mahajneh
Messages: 16
Registered: May 2010
Junior Member
hello littlefoot
thanx for reply
I stopped these swr
but the error still pop up
please preview the code again for other errors

[Updated on: Tue, 18 May 2010 03:41]

Report message to a moderator

Re: REP-0738: only a function allowed here [message #456516 is a reply to message #456510] Tue, 18 May 2010 03:52 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
How about you post the revised code?
And this time format it.
Re: REP-0738: only a function allowed here [message #456645 is a reply to message #456516] Wed, 19 May 2010 01:45 Go to previous message
mahajneh
Messages: 16
Registered: May 2010
Junior Member
thanx alot for helping me

i don't need this code any more
Previous Topic: How To Call Pdf Saved In Blob Data Base Field Direct Using Report Builder RDF
Next Topic: REP-159: Syntax error on command line
Goto Forum:
  


Current Time: Fri Mar 29 07:37:39 CDT 2024