Home » Developer & Programmer » Reports & Discoverer » whats wrong with the formula colomn
whats wrong with the formula colomn [message #273423] Wed, 10 October 2007 07:19 Go to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

HI MEMBERS,
I AM FACING AN ERROR WITH FORMULA COLUMN,PLZ HELP ME


REQUIREMENT:
DELFRT and DELNOFRT are the two codes where scheduled_ship_date will be
two days ahead...
PICFRT and PICNOFRT should show the same scheduled ship date as appears
in the order line.

I TOOK A FORMULA COLUMN AS SOURCE FOR SCHEDULE SHIP DATE?
BUT IAM FACING THIS ERROR

ERROR:is REP-0730:the following bind variable is not defined
FREIGHT_TERMS_CODE

can ANY ONE PLEASE LET ME KNOW HOW TO RESOLVE.....



function CF_1Formula return Date is
v_SSD date;
begin
v_SSD:=null;
IF :FREIGHT_TERMS_CODE='DELFRT' or 'DELNOFRT' then
select :schedule_ship_date+2 into v_SSD from oe_order_lines_all;
return v_SSD;
elsif
:FREIGHT_TERMS_CODE='PICFRT' or 'PICNOFRT' then
select :schedule_ship_date into v_SSD from oe_order_lines_all;
return v_SSD;
else
return 0;
end if;

end;


Error 49 at line 5,column 5
bad bind variable 'FREIGHT_TERMS_CODE'

[Updated on: Wed, 10 October 2007 07:31]

Report message to a moderator

Re: whats wrong with the formula colomn [message #273451 is a reply to message #273423] Wed, 10 October 2007 09:21 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:

IF :FREIGHT_TERMS_CODE='DELFRT' or 'DELNOFRT' then
Do you know PL/SQL?

By
Vamsi
Re: whats wrong with the formula colomn [message #273456 is a reply to message #273451] Wed, 10 October 2007 09:35 Go to previous messageGo to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

Hi Vamsi,
i am very new to this technology,thats why i am facing this problem
if u have any solution please help me looking forward for your response,could u please tell me how to resolve this .....

Thanks,
Vijaya
Re: whats wrong with the formula colomn [message #273460 is a reply to message #273456] Wed, 10 October 2007 09:51 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:

IF :FREIGHT_TERMS_CODE='DELFRT' or 'DELNOFRT' then
Syntax error.
You should write as either of the following
IF :FREIGHT_TERMS_CODE IN ('DELFRT', 'DELNOFRT') then
(Or)
IF :FREIGHT_TERMS_CODE='DELFRT' or :FREIGHT_TERMS_CODE='DELNOFRT' then
Similar way you may need to change in two places.

By
Vamsi
Re: whats wrong with the formula colomn [message #273484 is a reply to message #273460] Wed, 10 October 2007 10:56 Go to previous messageGo to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

Hi Vamsi,

I tried with this but it's not working out,iam attaching the screen shot too,please find it attached .

Thanks,
vijay

[Updated on: Wed, 10 October 2007 11:08]

Report message to a moderator

Re: whats wrong with the formula colomn [message #273523 is a reply to message #273484] Wed, 10 October 2007 14:41 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Post your new code and the error.

By
Vamsi
Re: whats wrong with the formula colomn [message #273782 is a reply to message #273523] Thu, 11 October 2007 12:19 Go to previous messageGo to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

Hi Vamsi,

this is the code i have modified as suggested by you,but still iam facing the same error

REP-0730 the following bind variable is not defined
FREIGHT_TERMS_CODE
ERROR 49 AT LINE 5,COLUMN 5
bad bind variable 'FREIGHT_TERMS_CODE'

function CF_1Formula return Date is
v_SSD date;
begin
	v_SSD:=null;
 IF :FREIGHT_TERMS_CODE='DELFRT' or :FREIGHT_TERMS_CODE='DELNOFRT' then
  	select :schedule_ship_date+2 into v_SSD from oe_order_lines_all;
  	return v_SSD;
  elsif
   :FREIGHT_TERMS_CODE='PICFRT' or :FREIGHT_TERMS_CODE='PICNOFRT' then
  		select :schedule_ship_date into v_SSD from oe_order_lines_all;
  		return v_SSD;
  	else
  		return 0;
  	end if;
  	
end;


please suggest me iam awaiting for your reply.....
Re: whats wrong with the formula colomn [message #273795 is a reply to message #273782] Thu, 11 October 2007 13:02 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Does this help you?

By
Vamsi
Re: whats wrong with the formula colomn [message #273819 is a reply to message #273782] Thu, 11 October 2007 15:48 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This error means that there's no 'FREIGHT_TERMS_CODE' in the report. What should it be? A column fetched by a query? A parameter? Formula column? Something else? Whatever it is, you can not reference something that doesn't exist.

Once you figure that out, do rewrite the function code. It *should* have only one RETURN statement (yours has three of them!).

Besides, why do you use a SELECT statement to compute something trivial?

I'd rather see it like this (which does not guarrantee that it is correctly written, as there are still too many unknown factors (what is ':schedule_ship_date', for example?)):
FUNCTION CF_1Formula RETURN DATE 
IS
  v_SSD date;
BEGIN
  IF :FREIGHT_TERMS_CODE = 'DELFRT' OR
     :FREIGHT_TERMS_CODE = 'DELNOFRT'
  THEN
     v_ssd := :schedule_ship_date + 2;
  ELSIF :FREIGHT_TERMS_CODE = 'PICFRT' OR
        :FREIGHT_TERMS_CODE = 'PICNOFRT'
  THEN
     v_ssd := :schedule_ship_date;
  END IF;
  
  RETURN (v_ssd);  	
END;
Re: whats wrong with the formula colomn [message #274296 is a reply to message #273795] Mon, 15 October 2007 07:46 Go to previous messageGo to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

hi vamsi
thanks for ur response
it helped me

thank u
Re: whats wrong with the formula colomn [message #274299 is a reply to message #273819] Mon, 15 October 2007 07:48 Go to previous messageGo to next message
we_jai@hotmail.com
Messages: 9
Registered: October 2007
Location: hyderabad ,india
Junior Member

hi little foot

ur response helped me a lot
thanks for ur response

thanks vijay
Re: whats wrong with the formula colomn [message #274559 is a reply to message #274299] Tue, 16 October 2007 07:28 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
LF,
solution helps me too ...
Ashu
Previous Topic: Migration from Oracle Reports 6i to 10g
Next Topic: reports hanging
Goto Forum:
  


Current Time: Fri Dec 02 12:13:22 CST 2016

Total time taken to generate the page: 0.21821 seconds