I'm making a report that will display a list of costumers and some numeric values. I use a formula in order to sort my group, wich is the following :
if {Db.SortOrder} = 0 then
{Db.CostumerName}
else
ToText({Db.Value},'00000000',0,'')
In this way i can group by costumer name or value, the problem is that i need to use a different sorting order for them, ascending order when i group by CostumerName and descending when i group by Value. How can i achieve that ? I've tried the "Sort group by formula" using crAscendingOrder,crDescendingOrder but it said i needed tu use a costant and not a variable (in my case i used db.SortOrder)