Sort Function in Database Reports

Getting your data onto paper - or the web - Discussing the reports features of Base

Sort Function in Database Reports

Postby psupgmer » Wed Sep 05, 2012 4:45 pm

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!!!
Openoffice 3.4.1 on MAC 10.7.4
psupgmer
 
Posts: 2
Joined: Wed Sep 05, 2012 4:33 pm

Re: Sort Function in Database Reports

Postby Villeroy » Wed Sep 05, 2012 5:12 pm

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
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26732
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Sort Function in Database Reports

Postby psupgmer » Wed Sep 05, 2012 7:51 pm

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!
Openoffice 3.4.1 on MAC 10.7.4
psupgmer
 
Posts: 2
Joined: Wed Sep 05, 2012 4:33 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest