Bug 95466 - Field properties in query result cannot be set to Currency
Summary: Field properties in query result cannot be set to Currency
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Queries
  Show dependency treegraph
 
Reported: 2015-10-31 11:02 UTC by Alwyn Stroh
Modified: 2018-03-23 10:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Query1 calculates the Sales Tax Amount payable on each transaction. (61.21 KB, application/vnd.oasis.opendocument.database)
2015-10-31 11:02 UTC, Alwyn Stroh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alwyn Stroh 2015-10-31 11:02:03 UTC
Created attachment 120136 [details]
Query1 calculates the Sales Tax Amount payable on each transaction.

I use a query to calculate the sales tax amounts to be paid on every transaction.
All field properties in the relevant table/s are correct and stable. The query works fine with all columns being displayed according the their relevant properties as set in the tables but the calculated column (amount in $ times rate 15/100) is displayed in numeric form with only one decimal instead of currency like the Amount column. Using "Column Format.." to set values to currency and right aligned works fine but with no option to save the changes which means every time the query is run the column is again displayed with the numeric values. The changes made with "Column Format.." just won't stick.

The file path given below will probably serve no purpose and I am unable to paste the query result.
Comment 1 Robert Großkopf 2015-10-31 15:10:42 UTC
It is the same reason as described in Bug 60539 (for column-width). Formatting of a query is saved nowhere inside the Base-file. You could change the format when opening the query, but that is all. The only way to see the right formatted field is to create a form with a tablecontrol.

This bug appears in all LO-versions and in all systems.

If you will only see the format inside the query (and won't change the value in any other way), you could change the SQL-code to something like this:
'N$'||( "Amount" * "Rate" ) / 100||'0' "VAT Amout"
... but be careful. This changes the result to a sting.

I will set this as an ask for an enhancement.