Created attachment 71964 [details] Two queries. One works with autofilter in every field, the other doesn't work in the subquery. Create a query with a correlating subquery. I have made this in the attachment: SELECT "ID", "Revenue", "Expense", ( SELECT SUM( "Revenue" ) - SUM( "Expense" ) FROM "Checkout" WHERE "ID" <= "a"."ID" ) AS "Balance" FROM "Checkout" AS "a" Set autofilter for some fields. Autofilter works with all fields, except the correlating subquery. It fails in the subquery with SELECT "ID", "Revenue", "Expense", ( SELECT SUM( "Revenue" ) - SUM( "Expense" ) FROM "Checkout" WHERE "ID" <= "a"."ID" ) AS "Balance" FROM "Checkout" AS "a" WHERE SELECT SUM( "Revenue" ) - SUM( "Expense" ) FROM "Checkout" WHERE "ID" <= "a"."ID" = 12.50 ORDER BY "ID" ASC The brackets around the subquery were removed. If you set two brackets before and after the subquery, only one bracket is removed and the autofilter works. SELECT "ID", "Revenue", "Expense", (( SELECT SUM( "Revenue" ) - SUM( "Expense" ) FROM "Checkout" WHERE "ID" <= "a"."ID" )) AS "Balance" FROM "Checkout" AS "a" works as expected for setting a filter to the subquery.
Reproduced in master (commit/build id c63b74d22d360893bb9e1200f59099ffb7943705 of 2013-07-03 21:36:58).
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6eb9c378f43e5f507d53d60d060becf4bb7615b8 fdo#58644 fix handling of subqueries The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d2f55bbc3067b0da9cf2d8e8f321765e74af6b4&h=libreoffice-4-1 fdo#58644 fix handling of subqueries It will be available in LibreOffice 4.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=75f59b8f79f31af1ffe1fee42d093ae9269485c3&h=libreoffice-4-0 fdo#58644 fix handling of subqueries It will be available in LibreOffice 4.0.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-4-1-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7802990f3155de25d38f894d1261dc975c37762d&h=libreoffice-4-1-0 fdo#58644 fix handling of subqueries It will be available already in LibreOffice 4.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.