PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → Report Sorting
Report Sorting
Iniciado por Marius, set., 30 2004 9:06 PM - 1 resposta
Publicado em setembro, 30 2004 - 9:06 PM
Hi Everyone
I am trying to sort a report by either surname or automatic ID.
I've followed the instructions in the help file (Sorting in a report), but don't know where in the report should I call the sort procedure. Should it be in the opening of the report or somewhere else?
Regards
Marius
Publicado em outubro, 02 2004 - 12:24 AM
Hi Marius
i used this in WD 5.5 and thats the way
-modify report description : button sort/break
- in the sort/break description: instead of a field name you give them name of a local proc. in my case : sortval() (can be combined with other fields)
make a local procedure wich returns the desired fieldname
in my case: dependig on a paramter value i sort in first place date, number etc.
you dont need to call this procedure, its done by WD !
Procedure sortval()
switch fbparam.PA_SortBJ
case 1
Result fbbjour.FBBJ_DAT
case 2
Result Fbbjour.FBBJ_BNR
case 3
Result Fbbjour.FBBJ_BELEG
case 4
Result Fbbjour.FBBJ_BETRA
case 5
Result Fbbjour.FBBJ_KTO
other case
Result fbbjour.FBBJ_DAT
END
Heinz
Hi Everyone
I am trying to sort a report by either surname or automatic ID.
I've followed the instructions in the help file (Sorting in a report), but don't know where in the report should I call the sort procedure. Should it be in the opening of the report or somewhere else?
Regards
Marius