Ask Your Question

LibreOffice Base subform displays unrelated records [closed]

asked 2014-03-21 19:27:08 +0200

ΜετάEd gravatar image

updated 2015-09-27 19:39:04 +0200

Alex Kemp gravatar image

I would like help solving a problem with a LibreOffice Base subform. I think the subform should be displaying only the records that are related to the record displayed in the parent form. But the subform is actually displaying every record in its data source, regardless of the relationship to the record in the parent form.

The parent form displays a manufacturing work order. It draws data from a query Work Ticket Traveler which consists of fields:


The subform displays materials needed. It draws data from a subquery WTT Subform which consists of fields:


You can readily see that the link field is WorkTktRecordNo. In the subform properties, the link master field is WorkTktRecordNo and the link slave field is WorkTktRecordNo. So this should cause the subform to display records from the subquery which are related through WorkTktRecordNo.

The only control in the subform is a table control which displays the four fields. This table control is the one with the problem: it displays every record in the subquery.

  • client: LibreOffice (Windows 7 Pro SP1)
  • server: Pervasive PSQL v10 SP2 Workgroup (, via ODBC (Windows XP SP3)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 08:27:39.789987

1 Answer

Sort by » oldest newest most voted

answered 2014-03-21 22:24:29 +0200

frofa gravatar image

updated 2014-03-21 23:37:11 +0200

Is this post of any relevance? I suspect the linking key value does not get passed to a QUERY (you are using for the source) in the FORM filter mechanism, but it does get used to filter a TABLE (or a VIEW). (Not sure about this, though.) Do you have 2 separate tables (i.e. one for WorkTickets and one for Components)?

edit flag offensive delete link more


Setting Analyze SQL command to YES did not change the behavior. I could not make sense of what the other poster was saying about creating "views" where he had queries before, perhaps because I think where the relational model uses the term "view" Base uses the term "query" so to me there is no difference. My parent form and my subform use "Content type: Query" and "Content: (the query name)". There are no explicit SELECT statements.

ΜετάEd gravatar imageΜετάEd ( 2014-03-21 23:49:33 +0200 )edit

Okay I am seeing that Query and View are two different animals. I cannot create a View, which is apparently a true relational view, a server-side query if you will. Pervasive doesn't support it. So if the linking key value does not get passed to a Query but does get passed to a View or a Table, then my only recourse is to see if I can redesign to use a Table.

ΜετάEd gravatar imageΜετάEd ( 2014-03-22 00:08:22 +0200 )edit

So, is your SUBFORM data source QUERY based on the same table as the query for the main (parent) form? NOTE: Base has a CREATE AS VIEW option (right click on the QUERY NAME in the query window) which creates the necessary VIEW. Such a VIEW behaves as a quasi table which you can then choose as the data source for the subform by choosing TABLE (not a query) from the content type drop-down. Can't see why this wouldn't work for your setup. So you may NOT need to go to a 2 table re-design?

frofa gravatar imagefrofa ( 2014-03-22 01:47:38 +0200 )edit

Question Tools



Asked: 2014-03-21 19:27:08 +0200

Seen: 1,115 times

Last updated: Mar 21 '14