Sorting on a field with a condition

Hi,

I have a field that I need to Sort on and it uses a condition to display a service name (Mani or Pedi), the condition spells out the name. I am getting an error when I run the report after putting the condition in the Sort Formula.

The error is ’ The database structure that was used for the design does not match the database structure at print time.’

The Sort Formula is : ’ Cond(Service = “Mani”, “Manicure”, Cond(Service = “Pedi”, “Pedicure”, Service)) ASC ’

The result of the formula needs to match a sort order that is available in the data source. Given that your change to the field content is rather small - would it be feasible to just sort by the Service field? That should yield the same results as sorting by the result of the formula (which is not possible, unfortunately). Or is this example just a simplification of your real problem?

Other than that, you’d probably need to add a column to your data source that contains the “correct” service name and then sort by this field.

Sorry I had to laugh at your phrase ‘or is this example just a simplification of your real problem?’ :rofl:
I tried sorting by the field itself to no avail, I will get with my end user to determine if it is a non-issue.