Created attachment 191133 [details] Database document with 2 forms "LO fail" and "LO work around" I have a working query with 2 subqueries in parsed mode. It returns the expected result when I open it. When I try to use that query with a subform, I get the following error: The data content could not be loaded. at /home/buildslave/source/libo-core/connectivity/source/commontools/dbtools.cxx:746 Column not found: SYSTEM_SUBQUERY.MID in statement [SELECT "Debits2".*, "Debits2"."Months" * "Debits2"."FEE" AS "Amount" FROM ( SELECT "Debits1".*, DATEDIFF( 'mm', "Debits1"."D", COALESCE ( "Debits1"."D2", CURRENT_DATE ) ) + casewhen( DAY( "Debits1"."D" ) < DAY( "Debits1"."D2" ), 1, 0 ) AS "Months" FROM ( SELECT "MS1"."D", MIN( "MS2"."D" ) AS "D2", "MS1"."MID", "MS1"."RID", "MS1"."FEE" FROM "MEMBERSHIPS" AS "MS1" LEFT JOIN "MEMBERSHIPS" AS "MS2" ON "MS1"."D" < "MS2"."D" AND "MS1"."MID" = "MS2"."MID" GROUP BY "MS1"."D", "MS1"."MID", "MS1"."RID", "MS1"."FEE" ) AS "Debits1" ) AS "Debits2" WHERE ( "SYSTEM_SUBQUERY"."MID" = :link_from_ID )] at /home/buildslave/source/libo-core/connectivity/source/drivers/jdbc/Object.cxx:173 MID is the column that should be substituted by the parent form's primary key. When I split the query in a cascade of 3 queries and bind the subform to the last one, the subform works as expected.
Open the forms "LO fail" (Query1) and "LO work around" (Debits). Both forms work with OpenOffice.
Could confirm the buggy behavior. Couldn't test with AOO, because I can't get Base working there (Java version could be found but doesn't work with AOO). Have tested also with older LO-versions. LO 6.4.7.2 is the oldest version I have installed, which will accept the Java-version I have installed. Did you use the same Java-version for both tests?
(In reply to Robert Großkopf from comment #2) > Did you use the same Java-version for both tests? $ java --version openjdk 11.0.21 2023-10-17 OpenJDK Runtime Environment (build 11.0.21+9-post-Ubuntu-0ubuntu120.04) OpenJDK 64-Bit Server VM (build 11.0.21+9-post-Ubuntu-0ubuntu120.04, mixed mode, sharing) Same version as displayed in the options dialogs of AOO/LO. Well, it's a JDK.