Home » Developer & Programmer » Reports & Discoverer » Returning multiple values from formula column
Returning multiple values from formula column [message #167998] Tue, 18 April 2006 06:01 Go to next message
fakhar55
Messages: 99
Registered: September 2005
Location: UAE
Member
hi gurus,
Laughing Can formula column return multiple values?
Re: Returning multiple values from formula column [message #168028 is a reply to message #167998] Tue, 18 April 2006 08:39 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
What do you mean by a formula column. Your qustion is extremely unclear.
Jim
Re: Returning multiple values from formula column [message #168035 is a reply to message #168028] Tue, 18 April 2006 08:48 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
@JSI2001:
from Report Builder Help

A formula column performs a user-defined computation on the data of one or more column(s), including placeholder columns. For example, :ITEMTOT *.07 is a formula that performs a computation on one column, while :SAL + :COMM performs a computation using two columns in a record. You create formulas in PL/SQL using the PL/SQL Editor.


I don't think you can return more than one value at once: you have one return type and output parameters aren't allowed I think. Note: I haven't checked.

MHE
Re: Returning multiple values from formula column [message #168037 is a reply to message #168035] Tue, 18 April 2006 08:55 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Doh! Smile

and output parameters aren't allowed 


You can use out parameters, but that means that they can't be used in sql
SQL> ed
Wrote file afiedt.buf

  1  create or replace function a (x in number, y out number)
  2  return number
  3  is
  4  begin
  5  y:=x*2;
  6  return 10;
  7* end;
SQL> /

Function created.

SQL> var m number;
SQL> var n number;
SQL> exec :m := a(2,:n)

PL/SQL procedure successfully completed.

SQL> print m

         M
----------
        10

SQL> print n

         N
----------
         4

SQL> select a(2,:p) from dual;
select a(2,:p) from dual
       *
ERROR at line 1:
ORA-06572: Function A has out arguments




Jim
Re: Returning multiple values from formula column [message #168039 is a reply to message #168037] Tue, 18 April 2006 09:08 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Yeah I know, but this is Reports specific. I haven't checked whether it can be done in Reports (and I don't think fakhar55 has tested it either) because of the reason you specified: in SQL it isn't allowed. I believe Reports will call the formula as a function in its SQL statements. Wink

MHE
Re: Returning multiple values from formula column [message #168041 is a reply to message #168039] Tue, 18 April 2006 09:15 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Gahhh! I'm an idiot! This is a Reports forum!!! Laughing what a plonker Laughing
Sorry Maarten (I was a little surprised at your comment about out parameters, the fact that it's in reports explains it Smile )

Jim
Re: Returning multiple values from formula column [message #168125 is a reply to message #167998] Tue, 18 April 2006 23:04 Go to previous message
fakhar55
Messages: 99
Registered: September 2005
Location: UAE
Member
Thanks Maaher for your response . My query is related to reports. I have checked but i formula column can't return multiplle values though it can be the source of multiple fields. Cool
Previous Topic: Reports Server have problems
Next Topic: oracle reports builder Report Builder 10.1.2.0.2(10g developer suite)..scheduling a report issues
Goto Forum:
  


Current Time: Tue Nov 26 11:26:09 CST 2024