Created attachment 132872 [details] Open the form and have a look at the SQL-error. Appears since LO 5.* Open the attached database. Open the form. An SQL-error appears. Let you show the details of the error. It gives the following code: SELECT "ID", "Text", "DateStart", "DateEnd", YEAR( "DateStart" ) AS "YearStart", YEAR( "DateEnd" ) AS "YearEnd" FROM "Table" WHERE ( "YEAR( "DateStart" )" = :link_from_YearStart ) AND ( "YEAR( "DateEnd" )" = :link_from_YearEnd ) The query uses the function YEAR. The code after WHERE is wrong. There are double-quotes added around function and fieldname. Must be YEAR( "DateStart" ), not "YEAR( "DateStart" )" The form will work right in LO 4.4.7.2 Fails first here with LO 5.0.0.5 Both tested with OpenSUSE 42.1 64bit rpm Linux.
Hello, it seems you're using an old version of LibreOffice. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Confirming on Version: 5.3.2.2 Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1 Threads CPU : 8; Version de l'OS :Mac OS X 10.12.4; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Also confirming that no error is produced with Version: 4.4.5.2 Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99 Locale : fr_FR.UTF-8 OSX 10.12.4
Regression introduced in range: https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=ffc1ffed11dc63a69fc2db04f12b3ea266b580fe..fb6dd2a73074b9695bd8ddf7ba40f1819b03024e where I can see some changes done by Lionel Elie Mamane.
probably, this commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=09a490ddf516289b4ce2f70a19603b9590917632 which deals with parameter name handling.
And possibly even this block, which seems to deal with quoting around the column name to build the filter parameter string : + { + OUString colName; + xDetailField->getPropertyValue("RealName") >>= colName; + sFilter += quoteName( m_sIdentifierQuoteString, colName ) + " = :"; + }
Thanks for the precise code pointer.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e6b275a19b3f11e9a5d87d1cbb9ad192705572f tdf#107457 don't quote columns referred by expression (not by name) It will be available in 5.4.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.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b78cabc850e0a71873714c892c46c9edb25fd364&h=libreoffice-5-3 tdf#107457 don't quote columns referred by expression (not by name) It will be available in 5.3.4. 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.