Bug 164324 - FIREBIRD: Subform couldn't be linked by Alias of a query - new entries in subform couldn't be created.
Summary: FIREBIRD: Subform couldn't be linked by Alias of a query - new entries in sub...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-14 18:28 UTC by Robert Großkopf
Modified: 2024-12-15 20:11 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Open the 2 forms and see the difference. Subform connected by Alias isn't really connected. (23.91 KB, application/vnd.oasis.opendocument.database)
2024-12-14 18:28 UTC, Robert Großkopf
Details
Showing the connection (2.36 MB, video/mp4)
2024-12-15 18:45 UTC, jcsanz
Details
Showing the connection (3.72 MB, audio/ogg)
2024-12-15 18:54 UTC, jcsanz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-12-14 18:28:45 UTC
Created attachment 198111 [details]
Open the 2 forms and see the difference. Subform connected by Alias isn't really connected.

Added simple example.
Open the attached database.

Open form frm_WidthSubformAlias.
There are 2 fields as mainform and a tablecontrol as subform. Note: Field TID doesn't show any value, but mainform is connected from "ID" to "TID" in subform.
Datasource of subform is qry_Person_Alias. "TID" is an alias for "TownID".

Open form frm_WithSubformWithoutAlias.
Tablecontrol in subform will show a ´value for TownID, which is the value from ID in mainform.

It is impossible to connect a subform to a form by a field, which is renamed by an alias.
Version: 24.8.4.1 (X86_64) / LibreOffice Community
Build ID: 1be9007f5d86a3741c366527d13e2970cbeef057
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 jcsanz 2024-12-15 18:42:35 UTC
(In reply to Robert Großkopf from comment #0)
> Created attachment 198111 [details]
> Open the 2 forms and see the difference. Subform connected by Alias isn't
> really connected.
> 

> It is impossible to connect a subform to a form by a field, which is renamed
> by an alias.

According with my tests, the connection between the forms is posible. If you have previous data in both tables, and navigate in the main form, you can see the data in the subform moving accordingly.

What is not possible is to modify the data in the subform, which is not allowed in the database, even without Base intervention, it is logical, because we are trying to do an INSERT or UPDATE of a field (the alias) that does not exist in the database.
---------------------------
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 2 jcsanz 2024-12-15 18:45:15 UTC
Created attachment 198122 [details]
Showing the connection
Comment 3 jcsanz 2024-12-15 18:54:09 UTC
Created attachment 198123 [details]
Showing the connection
Comment 4 Robert Großkopf 2024-12-15 20:11:39 UTC
(In reply to jcsanz from comment #1)
> (In reply to Robert Großkopf from comment #0)
> > Created attachment 198111 [details]
> > Open the 2 forms and see the difference. Subform connected by Alias isn't
> > really connected.
> > 
> 
> > It is impossible to connect a subform to a form by a field, which is renamed
> > by an alias.
> 
> According with my tests, the connection between the forms is posible. If you
> have previous data in both tables, and navigate in the main form, you can
> see the data in the subform moving accordingly.

You haven't tested the subform. The connection has been made, but have a look at the subform. You only moved through the mainform.

Type a "Name" in subform.
Change to next row.
Firebird get's an exeption, because the TownID in the table is set as "NOT NULL". TID is empty while I input a new row.

Change to the other form.
You will see the value for TownID in the subform.
You could type content in "Name" and save it.

The link to subform doesn't work well. New entries couldn't be created.