Apache OpenOffice (AOO) Bugzilla – Issue 12329
Form / Subform # Link from / Link to -> don't work with more than one parameter
Last modified: 2017-05-20 10:45:19 UTC
To make the problem reproducible for you i give an example ( I know, that nobody would do so in reality) Let's say: in the (main)form we have "maintable" - in the subform we have "subtable" In the form I have a table with two fields - let's say field_a and field_b I want to look for them in the subform - let's say subfield_a and subfield_b In the subform following two constellations are working properly: -------------- 1: select ... from subtable where subfield_a=:a Link from: "field_a" Link to: "a" ------------- 2: select ... from subtable where subfield_b=:b Link from: "field_b" Link to: "b" Now we change example 2 to 2a 2a: select ... from subtable where subfield_b=:b Link from: "field_a";"field_b" Link to "a";"b" Example 2a don't work! ( I know that there is no subfield_a=:a in my where clause; it's for demonstration. But the former where clause don't work if it's parameter is on second place in the list) So I suppose that only the first parameter is handed over (from the form to the subform) , but not the second. I also tried example 2a under StarOffice 5.1 (SUSE Linux). There example 2a works. Do you know what I mean? Can you reproduce ? Is this a bug ? Greetings from Jörg
Hi Frank, should this work at all and what should happend? Can you have a look on this. Thanx. Bye Marc
Hi Frank and Mark, in the program-help user can read, that you can use more than one parameter. (separated by CTRL-RETURN) But if a user do so (like me ;-) OO crashes and the user does not know why. If you do not want to implement please don't forget to change the help and/ro make it unpossible to enter more than one parameter. In general oo gives not much error messages - the real problem was hard to find. Bye Jörg
well, 2a should work, at least I currently (out of my head) can't imagine any reasons why it should not. Finally, it's just "too much" information :) > But if a user do so (like me ;-) OO crashes and the user does not know > why. well, crashes are always a Bad Thing (TM), no matter of the circumstances :)
Created attachment 6544 [details] (dBase) database to help to reproduce this
Created attachment 6545 [details] form document for reproducing the bug
the attached zip file contains two dBase tables, which should be extracted into any directory. Then, create a dBase data source named "Bibliography" pointing to this directory. Finally, open the attached bugdoc.sxw, it will work with the two tables, and show the bug here. Confirming and accepting.
"According to the OpenOffice.org roadmap (http://tools.openoffice.org/releases) this issue was retargeted to OOo Later."
change subcomponent to 'none'
I wanted to point out another facet of the problems that linking subforms to forms does not work with more than one parameter. Consider a database which has two tables, projects and employess and a relational table linking these tables which stores, say, assignments of employess to a project for some quarter and to a certain percentage. The classic DB design to represent this is the following: PROJECTS PROJECT_ID PROJECTNAME 0 Project 1 1 Project 2 2 Project 3 EMPLOYEES EMPLOYEE_ID NAME 0 JACK 1 JOHN 2 JIM ASSIGNMENT PROJECT_ID EMPLOYEE_ID QUARTER PERCENTAGE 0 0 1Q05 80 1 0 1Q05 20 0 1 1Q05 100 ... and so on ... I would like to build a form, which allows me to select both a project and a user, and then to enter assignments for this combination of project/user into the database. No matter how you build your form, you will always end up with a query which requires two parameters to select the correct row of the ASSIGNMENT table. One parameter is bound to a PROJECT_ID value of the PROJECT table, the other is bound to an EMPLOYEE_ID of the EMPLOYEE table. What I observed is that both parameters in the query are set to the same value, in my case always the project ID value. (I suspect that it is always the value of the parameter specified first...) Note that I was working with version 1.9.122!!! I strongly suggest to change the priority of this issue to at least P2, because if it is not possible to build such basic forms using BASE, its usefulness is very questionable. -- markus, looking forward to a quick solution
This problem persists in OpenOffice Base 2.0.139 If a "maintable" has a primary key which consists of two columns and a "subtable" is linked by two columns, then only a value of the first column is inserted into both columns of the subform. For example: main table is keyed by fields "Year" and "ContractNumber". The value 2005 is inserted into both "Year" and "Contr_num" fields of the subform.
The original scenario describe in this issue works fine for me in OOo 2.0.1. joergf, could you please verify or falsify this?
Reset the assignee to the default "issues@openoffice.apache.org".