Hi, I have an Active Report and I would like to be able to sort on more than one column. I noticed that in the Help it says that 'inner sort' is supported if the report is expandable, is this what Im looking for? Setting the report to expandable ON isnt working.
"If the ALLOW-SORT option is enabled, users have options to sort columns in either ascending and descending order. For string data types, the sorting is alphabetical. For date data types, the sorting is chronological. When the report view option is expandable, an inner sort is also supported."
My code:
ON TABLE PCHOLD FORMAT AHTML ON TABLE SET PAGE-NUM OFF ON TABLE COLUMN-TOTAL AS 'Totals' ON TABLE SET HTMLCSS ON ON TABLE SET EMPTYCELLS OFF ON TABLE SET EXPANDABLE ON ON TABLE SET STYLE * WRAP=OFF, UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, TITLETEXT='&TITLETEXT.EVAL', $ TYPE=REPORT, ALLOW-SORT=ON, ALLOW-VISUALIZE=ON, $This message has been edited. Last edited by: Kerry,
WebFOCUS 7611 Windows XP Pro
March 23, 2010, 02:42 PM
GamP
Just ran this in 765, and I think it is exactly what you're looking for. This is my example code:
TABLE FILE CAR
PRINT MODEL SEATS
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'Totals'
ON TABLE SET HTMLCSS ON
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET EXPANDABLE ON
ON TABLE SET STYLE *
TYPE=REPORT,
ALLOW-SORT=ON,
$
END
And I can sort on cars within a country. Is that what you're looking for?
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 24, 2010, 05:58 AM
LEnderby
Hi, thanks for your input I can see how that functionality works now, I wasn't getting that on my report. I need to be able to sort on any fields. So for example there you can sort on country within car, I would like to be able to sort on car within country, and on any number of fields in any order. So the flexibility isn't there for my needs. I guess I will have to code this in webfocus and do away with active reports. Would you be able to advise me on the best approach?
WebFOCUS 7611 Windows XP Pro
March 24, 2010, 06:45 AM
Dan Satchell
This link offers one technique for providing column sorting functionality.