Bug 148096 - EDITING: Aliases ignored in form with SQL command as data source in embedded Firebird
Summary: EDITING: Aliases ignored in form with SQL command as data source in embedded ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Firebird-Default Database-Forms
  Show dependency treegraph
 
Reported: 2022-03-20 13:00 UTC by johnny bugs
Modified: 2023-04-30 08:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnny bugs 2022-03-20 13:00:25 UTC
When using functions with aliases in an SQL command to set the data source for a new (sub)form, the alias won’t show in the list of applicable attributes when assigning data to a field / column. Instead the used function is shown.

Steps to Reproduce:
1. Create new form in Design View
2. Create new form in Form Navigator
3. At Data > Content Type in Form Properties choose SQL command
4. Use any function with an alias in the select statement
5. Create a Table Control or other field
6. Insert new column and assign data from list

Actual Results:
The list won’t show the alias but instead the used function, p.e. ADD / CONCATENATION / CONCATENATION1 / SUM / etc.

Expected Results:
Show the aliases in the list

Additional Info:
There is a work around. First create a query with the same SQL command. Then use this query as the data source instead of the SQL command

Reproducible: Always
User Profile Reset: Yes
OpenGL enabled: Yes

Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-IE (en_IE); UI: en-GB
Calc: threaded
Comment 1 Robert Großkopf 2022-03-20 16:22:31 UTC
Would be good to provide an example here.
Have tested this:
Table with on field, which is INTEGER.
SQL in the form: SELECT "ID", "ID" * 3 AD "triple" FROM "Table"
If I choose a form control I will get "MULTIPLY" for this field with internal Firebird. Will be "triple" with internal HSQLDB.
If I choose "Field add …" of the toolbar for creating forms there will be shown "triple".

The alias will be also ignored for other fields, not only for fields, which contain a function. You could write 
SELECT "Name" AS "Forename" From "Table"
and "Name" will be offered for selection in the controls.

This is a special bug of internal Firebird database.

Tested with OpenSUSE 15.3 64bit rpm Linux and LO 7.3.1.3.
Comment 2 Stéphane Guillou (stragu) 2022-03-22 02:34:47 UTC
Wondering if it could be related to Bug 132924 and Bug 132924, although those ones are about column aliases.