Apache OpenOffice (AOO) Bugzilla – Issue 99980
Lost Format of Integer (and Other Numeric Fields)
Last modified: 2013-01-29 22:01:36 UTC
OpenOffice Base 3.01 in Windows XP does not save its formatting when applied to an Integer field (or other numeric field). Follow these steps to reproduce the error: 1. Launch OpenOffice 3.01, Create a database using OpenOffice HSQL database engine. 2. Create a table that includes at least one numeric field like Integer. For this example the Integer field will be called "Primary Key" and it will auto-increment and be the primary key. 3. Click on the Field Type (Integer) and change the "Format Example" to "ABC"000 4. Click the OK button, click the save button, and save the database. 5. Create a Form that allows for data to be entered into the newly created table and allow the Form to edit database data. Be sure the Form allows for the display of the auto-incrementing Integer field called "Primary Key." 6. Save the Form. 7. Use the Form to enter data. Notice that the "Primary Key" field within the form does not maintain its format. It should display ABC000 but it displays 0. 8. You may need to quit OpenOffice a few times to see that the "Primary Key" field within the form does not maintain its format. Also note that the the "Primary Key" field within the Table defaults to its original format.
*** Issue 99981 has been marked as a duplicate of this issue. ***
Please note that issue #99981 is NOT a duplicate of this issue #99980.
Created attachment 63894 [details] example database
Confirmed w/ OOO310m_17 and OO.o3.1, Ubuntu 9.04 NOTE - I'm leaving the actual issue as unconfirmed - not because this doesn't happen but because it appears there are a couple of problems all working together. This perhaps should be broken into multiple issues and perhaps an RFE. 1) User defined formats - these seem to be changed after the file is saved and reopened. So "ABC"0000 after re-open becomes "ABC"# under m_17. Under 3.1 it came back as "ABC""/"# (Also I kind of recall seeing an Issue about this with regards or something similar, under Calc or Framework...will need to do some searching) 2) Form controls. Individual controls seem to pick this formatting up and use it. Controls in table Grid columns do not - unless they are used as part of a Master/Detail form, and the Master form is using an individual control properly formatted. (~clear as mud..sorry) 3) Three times while testing this with a form using stand alone controls the DBEngine throw an error saying that a duplicate value was rejected for the Auto_Increment field. Closing the form and repoening it put all back right...there did not seem to be a pattern to when it would do this however. (Note there is an unconfirmed Issue in the system right reporting just this behavior that has nothing to do with formats - so need to see if I can duplicate this without the format being involved) 4) Query designer - the default format is honored when the you first create a query. After closing and the exectuting the query later it is lost. (Again I think there might be an existing issue on this...more searching) 5) When creating a form the controls that do honor the formatting seem to pick this up at design time and then save it - so that if you later change the format for field definition and run the form you still get the old formatting. (This might be the RFE) @rk601 - I think it would be best if you could help me work through this and we discuss it on one of the mailing lists first and then come back to the issue tracking system. users@dba.openoffice.org seems like a good list.
Additional information regarding formatting errors in FormattedField controls. 1) in a GridControl - a FormattedField >does< pick-up and retain the formatting; (eg, format=(1234.00) does display with two decimal places (as in a Currency field) 2) an individual formatted field control - not bound to a data item - does not retain formatting. Both decimal and currency formats display as integers. [the formatted field is filled in with computed results from a SELECT SUM(... ) stmt.] ooo310_m19/winXP