Sort custom field containing formula

Hello!!

We are using KReporter V3.1

We have a report that has a custom field with a formula that subtracts the value of one field and the sum() of another field, but not allow to sort ascending or descending by this custom field.

Anyone know if there is any issue with the ordering of fields with formulas?

Thanks.

Pablo,
sorting is made on the database query sent to retrieve report data. That’s why you can’t sort by a column which is calculated after data was retrieved. Formulas are applied after the data was returned.
You might be able to make the math with customSQL function instead of formula. It depends on how you obtain the values for sum and value to substract.
Valérie

1 Like

Thank you very much for your help.