Home » Developer & Programmer » Reports & Discoverer » sorting order (reports 6i)
sorting order [message #507889] Wed, 18 May 2011 07:11 Go to next message
velubaskar
Messages: 6
Registered: November 2009
Junior Member
1) eno list values ASC , DESC
priority Column : 2

2) DNO List Values ASC , DESC
priority column : 1

3) DTNO List Values ASC , DESC
priority column : 3

So i need the sorting order output like this
LIST VALUES ASC (OR) DESC USER SELECT AT RUN TIME ANY VALUE.

ORDER BY DNO DESC , ENO ASC , DTNO ASC

* The Priority is user will enter at run time based on the number the column should be sorting.
Re: sorting order [message #507893 is a reply to message #507889] Wed, 18 May 2011 07:29 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use a lexical parameter for the order by clause.
Re: sorting order [message #507911 is a reply to message #507893] Wed, 18 May 2011 08:25 Go to previous messageGo to next message
velubaskar
Messages: 6
Registered: November 2009
Junior Member
i used lexical parameters.
but output is not sorted.
can u give me the sample code.
Re: sorting order [message #507914 is a reply to message #507911] Wed, 18 May 2011 08:30 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have got the break order property set on any items in the report query? That'll override the order by.
Re: sorting order [message #507918 is a reply to message #507914] Wed, 18 May 2011 08:41 Go to previous messageGo to next message
velubaskar
Messages: 6
Registered: November 2009
Junior Member
This is a tabular report .
all the columns of break order is set to "ascending" only.
Re: sorting order [message #507920 is a reply to message #507918] Wed, 18 May 2011 08:44 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well that overrides the order by and can't be changed programatically. So you need to change the break order of all the columns to none.
Re: sorting order [message #508006 is a reply to message #507920] Wed, 18 May 2011 20:51 Go to previous message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Thats not true always.
ind> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
4 rows selected.



Attached is a sample report which has break order Asc on all Report columns.
I have created the Order by clause in report query like
order by LOC &resclause_loc, dname &resclause


@ OP
Quote:
ORDER BY DNO DESC , ENO ASC , DTNO ASC

* The Priority is user will enter at run time based on the number the column should be sorting.


You have to construct Your string.



Sriram

[Updated on: Wed, 18 May 2011 21:08]

Report message to a moderator

Previous Topic: How to Make This Query
Next Topic: templete attahcment
Goto Forum:
  


Current Time: Fri Apr 19 20:36:22 CDT 2024