Home » Developer & Programmer » Reports & Discoverer » How we can use a formula column in order by clause  () 1 Vote
How we can use a formula column in order by clause [message #169319] Wed, 26 April 2006 04:49 Go to next message
gladiator
Messages: 21
Registered: April 2006
Location: Lahore, Pakistan
Junior Member
Hi,
I need ur sugessions guys/guls can u tell me how we can use a formula column in order by clause. the situation is this i have used a formula in one of my detail data block and now in out put of the report i want to order by/sort the data on that formula column.
any ideas???
Re: How we can use a formula column in order by clause [message #169330 is a reply to message #169319] Wed, 26 April 2006 05:20 Go to previous messageGo to next message
kmsalih
Messages: 197
Registered: March 2006
Senior Member
hi

is ti like this

select ename,sal*10 from emp order by 2;


Salih KM
Re: How we can use a formula column in order by clause [message #169337 is a reply to message #169330] Wed, 26 April 2006 05:54 Go to previous messageGo to next message
na_deu
Messages: 7
Registered: April 2006
Junior Member
right click on that formula column
check on 'break order'
ascending
drag it to the top of the group
Re: How we can use a formula column in order by clause [message #170325 is a reply to message #169319] Wed, 03 May 2006 06:07 Go to previous messageGo to next message
gladiator
Messages: 21
Registered: April 2006
Location: Lahore, Pakistan
Junior Member
Hi,
Tnx for ur replies.

but my problem is still there, let me explain iin detail, lets suppose my query is this

SELECT vendor_id,segment1 FROM
po_vendors

there is a formula column that do some calculation and return a value, i want to order by on this value. but as u suggest me to use break order property but it is not working, i m using dev6.

Regards.
Usman
Re: How we can use a formula column in order by clause [message #170335 is a reply to message #170325] Wed, 03 May 2006 06:56 Go to previous messageGo to next message
na_deu
Messages: 7
Registered: April 2006
Junior Member
if you have a leading group before the group that contains the formula, then the order by the formula would not be the leading order .
you can put all the columns in the same group with the formula and let the formula be the first column in that group. keep the ascending break order on that formula.
let us know if it works now.
Re: How we can use a formula column in order by clause [message #170339 is a reply to message #169319] Wed, 03 May 2006 07:15 Go to previous messageGo to next message
gladiator
Messages: 21
Registered: April 2006
Location: Lahore, Pakistan
Junior Member
Hi,
Tnx for ur quick reply.
but i m sorry to say that its still not working i have used the single block puted the formula column on the top and changed its break property to asc and then desc both did't worked. any idea...?

Regards.
Re: How we can use a formula column in order by clause [message #170501 is a reply to message #170339] Thu, 04 May 2006 01:45 Go to previous messageGo to next message
na_deu
Messages: 7
Registered: April 2006
Junior Member
hi. sorry i forgot. the formula must be the leading group.
check this test report (on dev6). it worked fine with me. but i don't know it suits you.
  • Attachment: MODULE1.rdf
    (Size: 56.00KB, Downloaded 1175 times)
Re: How we can use a formula column in order by clause [message #170508 is a reply to message #169319] Thu, 04 May 2006 02:18 Go to previous message
gladiator
Messages: 21
Registered: April 2006
Location: Lahore, Pakistan
Junior Member
Hi Na_Deu,

Thank you very much for ur help.
I got the solution of my problem.

Wish u a very very Good luck in Life.

Regards,
Usman.
Previous Topic: Can you run a Report from PL/SQL program?
Next Topic: Discoverer Privileges Not Working
Goto Forum:
  


Current Time: Sat Jun 29 02:41:30 CDT 2024