Focal Point
Sorting Data

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3551074762

January 22, 2008, 11:30 AM
Majid Jeddi
Sorting Data
Hi,

Is it possible to sort a report based on a field that is not used in a group by and which is not displayed on the report but part of the data source?

Any help will be greatly appreciated.

Regards.

Majid.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
January 22, 2008, 11:34 AM
Tony A
BY fieldname NOPRINT

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 22, 2008, 02:26 PM
Majid Jeddi
Hi Tony,

This is the equivalent in the GUI of adding the field then make a group by and make it invisible.
If yes, that means I need to add the field to the report then make it invisible.
I wanted to know if it is possible to sort on a field that is part of the data source but i do not want it to make it a by field.

Thanks.
iS that possible.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
January 22, 2008, 03:57 PM
Darin Lee
The answer would be NO. The ability to sort in WebFOCUS is based on the use of BY. That's a pretty basic principle. What is the problem with making it a BY field?

Otherwise you can run a query and ON TABLE HOLD then it is sorted for the final report but you don't have to use a BY field in the final report - but this all seems pretty useless.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
January 22, 2008, 04:03 PM
Tony A
Majid,

Tell me, in MS SQL can you have an ORDER BY phrase without the column being in the data? Same thing.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 22, 2008, 04:35 PM
FrankDutch
Majid

You can use FML.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 23, 2008, 01:19 AM
Majid Jeddi
Hi Tony,

in sql server you can sort on a field which is not part of the data returned.
in the other hand, the reason for what I am asking that is because in other reporting tool you can create a report and sort it based on a field which is not displayed.

Thanks.

Majid.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
January 23, 2008, 02:24 AM
Tony A
quote:
... and sort it based on a field which is not displayed.

because under the covers it is used like WF uses it in a NOPRINT. In WF you just have to do that yourself.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 23, 2008, 02:43 AM
Alan B
Majid

Data can be read from a data source in 3 ways:
1. Following the primary key sequence
2. Physically from the beginning
3. Via an index

If the data returned by any of these methods is in the order you need, then a sort will not be required, otherwise, the field you are sorting on MUST be retrieved from the data, whether the request indicates this or not. WF hides this with a NOPRINT, other tools may do it under the cover.


Alan.
WF 7.705/8.007
January 23, 2008, 08:13 AM
Majid Jeddi
Hi,

Thanks to all of you for the valuable explainations you gave regarding this subject.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server