Hello,
I have a report datawindow with computed columns and a button to sort the datawindow based on a computed column.
The code for the button looks something like this:
dw_rpt.SetSort('')
dw_rpt.SetSort("compute_6 desc")
dw_rpt.Sort()
For reference, this is the code of compute_6 :
sum(if(( daysafter(aptrans_voucherdate, today()) + 1 >=31 and daysafter(aptrans_voucherdate, today()) + 1 <=60 ),compute_16 , 0) for group 1)
When the button is clicked, the values of the computed column with look like this:
See that some values are not getting ordered correctly.
I tried integer(compute) and cast(compute as int) but the results are the same.
Is there way to solve this?
Thanks.