Page 1 of 1

Sort Function in Database Reports

Posted: Wed Sep 05, 2012 4:45 pm
by psupgmer
I am trying to create a report that sorts a sum of several fields from the query. The equation from the query is as follows:

"Table1"."PS #1" + "Table1"."PS #2" + "Table1"."PS #3"

When I create a report through the Wizard and ask it to sort this equation ascending, it doesn't import any of the data into the report.

Please help!!!

Re: Sort Function in Database Reports

Posted: Wed Sep 05, 2012 5:12 pm
by Villeroy
Do all sorting in the query.
And use an alias name for the calculated field.
SELECT *, "Table1"."PS #1" + "Table1"."PS #2" + "Table1"."PS #3" AS "Sum" FROM "Table1" ORDER BY "Sum" ASC

Re: Sort Function in Database Reports

Posted: Wed Sep 05, 2012 7:51 pm
by psupgmer
When I put this formula into the field in a query, it comes up with an error that the column is unknown. What am I missing?

Thanks!