Focal Point
[SOLVED] pagination & sorting

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

September 21, 2010, 08:17 AM
swati
[SOLVED] pagination & sorting
Hi all,
i used the pagination techniques,But now i want to know How to sort in a particular page.
i.e; if i have 30 pages and each page has 10 records each then if i go to page 20 or 12 ,i need to sort the records in that corresponding page Desc order.
right now i can sort but what ever page i go ,my sorting is happening for all the 30 pages.

please help...

This message has been edited. Last edited by: Kerry,


7.6.7
windows
PDF,EXCEL.
September 21, 2010, 11:32 AM
Francis Mariani
I think there are 305 people that don't understand your question.

Shouldn't this be solved by two BY statements?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 22, 2010, 04:45 PM
saikumar
quote:
I think there are 305 people that don't understand your question.

Yes...please elaborate yours Issue...
If you already have pagenation functiocnality then
you can always capture which page your navigating on...Keep that pagenumber in a variable.

Simple syntax below
-SET &SORT = IF &PAGENUM EQ 20 OR 12 THEN 'HIGHEST' ELSE '';
TABLE FILE your table
BY &SORT sort field
END
 


Thanks,
Saikumar.


WebFOCUS 8103 Appstudio, Dev Studio MRE
Client Windows 7, Serveron Unix.
Excel, PDF, HTML,AHTML
September 23, 2010, 02:41 AM
GamP
I think what Swati means is that he/she is using on-demand-paging.
And then when going to page 3 it would be nice to be able to sort the records in ascending or descending order on that page only and thus keep the contents of every page the same only sorted differently.
There is no standard thing in the ODP to get that done.
There is a possibility to code it yourself, although it is just an idea, I haven't tested it.
You could count your records and based upon that create a page number for every record. Set the number of lines per page to something hihgher than what you actually want per page. Then sort on the page number (low to high) with page-break and then apply the normal sorts you already have in place. Whether you do these low-to-high or high-to-low doesn't matter, the records will stay on the same page because of the higher level sort on page number.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988