Focal Point
[SOLVED] Changing data from ascending order to default

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

March 21, 2018, 01:38 AM
asamant59
[SOLVED] Changing data from ascending order to default
Hi I am facing an issue with data from report that i have created.It gives me data in ascending order of the , instead i want the data to be shown according to the year.
So how do i change the same ??

TABLE FILE CLOSEDCR
SUM ERROR
OVER MAJOR
OVER MINOR
OVER PROJECT
OVER STD
ACROSS YEAR_OF_CLOSING AS ''
ACROSS MOUNTH_OF_CLOSING AS ''
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE PCHOLD FORMAT HTML

-*ON TABLE PCHOLD FORMAT EXL2K NOBREAK

ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
-*ON TABLE SET STYLEMODE FIXED
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=REPORT, BORDER=ON, GRID=ON, SQUEEZE=OFF, FONT=CALIBRI, WRAP=0.32000,
$
TYPE=TITLE, COLUMN=MAJOR, BACKCOLOR=RGB(0 60 125),
$
TYPE=TITLE, COLUMN=MINOR, BACKCOLOR=RGB(71 164 189),
$
TYPE=TITLE, COLUMN=STD, BACKCOLOR=RGB(112 183 205),
$
TYPE=TITLE, COLUMN=PROJECT, BACKCOLOR=RGB(160 202 217),
$

ENDSTYLE
END

2017 2018
1 10 11 12 2 3 4 5 6 7 8 9 1 2
ERROR 38 1 1 0 21 5 0 4 1 2 2 7 0 3
MAJOR 45 23 6 5 47 10 15 32 16 24 16 24 3 5
MINOR 51 3 2 0 18 6 4 11 4 5 7 6 1 7
PROJECT 12 12 8 5 9 2 1 7 7 9 6 2 0 3
STD 13 1 0 0 9 1 45 17 5 1 4 3 0 0

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, all Outputs
March 21, 2018, 02:56 AM
Dave
both BY and ACROSS sort the data.

I think your problem is that MOUNTH_OF_CLOSING is not a number. ( it's alphanumeric )

Sorting will be
1
10
11
12
2
3
4
5


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 21, 2018, 08:58 AM
vinodh
i guess you want to sort the 2 fields as per calendar.

solution1: if yes, then create a corresponding define fields in integer datatype for all the 12 months and then sort them based on the define field.
solution2: if possible change the original field datatype to integer which will do the job automatically.

like 1 for jan, 2 for feb and so on....

[quote]ACROSS MOUNTH_OF_CLOSING AS [quote]


WebFOCUS 8
Windows, All Outputs
March 22, 2018, 12:15 AM
asamant59
Yes the data I am getting is of the same manner, can something be done in the code in improving the logic ?? Only this part of the report is affected and showing me data in that way


WebFOCUS 8
Windows, all Outputs
March 22, 2018, 04:16 AM
Dave
okay,

this is so basic. This is in all courses and documentation.

This is not a : teach-me-webfocus forum.

As vinodh suggested : solution 2.
Change the field datatype to integer.

Or create another field with the same data as an integer.


_____________________
WF: 8.0.0.9 > going 8.2.0.5