Apache OpenOffice (AOO) Bugzilla – Issue 31995
Writer shows default date on merge fields with NULL date values
Last modified: 2013-08-07 14:38:26 UTC
this is a follow-of of Issue 8091. original message of domingosgv: I have a data source with some Numeric-Fields and Date-Fields. Openoffice show dummy values for empty Fields like this: "0" for Numerics, "01.01.1900" for Date Fields If I work with hidden paragraphs, I must work permanently with tables, otherwise will be the hole paragraph hidden. If i work with conditional fields, i can not format the date. I work in a public administration and i can not typing "dummy" values on a certificate. If the Fields are "Empty", the result should be "". We will work wirh Openoffice but this is a show stopper for us ---------------------- I can confirm this behaviour for Speardsheet and ODBC (postresql) Datasources
reassigned to ES.
->andreachnabel: please add a sample spreadsheet. ->SMC: can you test this with postresql. I cannot reporduce it with dBase tables
Created attachment 16744 [details] clac sheet with example data
Created attachment 16745 [details] writer file with merge field
->es: you can use the two documents to reproduce. Set Data sorurce for the sxw to table1 of the sxc. Select a row where "vom1" is null and set data to fields.
I confirm, with both HSQL and Postgres, on both m118 and m122. When using "date" database fields in database forms, when creating new records, if the "default date" parameter has not been set for the form object, Writer sets the default value to the date of the day. However, many applications require the date to be set to "NULL" when not specified. The date can still be set to NULL if the user deletes it from the form. However this is not as appropriate workaround.
I confirm this too with postgresql jdbc and in base I can use somehting like oEvent.Source.getColumns().getByName("birthdate").updateNull() in the reset form event for a fix with mysql but when using postgresql 8.1 jdbc i get SQL Status: 42804 ERROR: column "birthdate" is of type date but expression is of type character varying I believe this is because oo is trying to pass null as a string I can enter a date then save the record, then erase the date and save the record and it works with no error. it seam on the insert statement updateNull is not casting to the right type.
SQL Status: 42804 ERROR: column "birthdate" is of type date but expression is of type character varying only happens when using a formated datefield