Issue 31995 - Writer shows default date on merge fields with NULL date values
Summary: Writer shows default date on merge fields with NULL date values
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 680m47
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-23 12:35 UTC by andreschnabel
Modified: 2013-08-07 14:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
clac sheet with example data (6.20 KB, application/vnd.sun.xml.calc)
2004-07-23 21:54 UTC, andreschnabel
no flags Details
writer file with merge field (12.82 KB, application/vnd.sun.xml.writer)
2004-07-23 21:55 UTC, andreschnabel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description andreschnabel 2004-07-23 12:35:08 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
Comment 1 michael.ruess 2004-07-23 12:39:34 UTC
reassigned to ES.
Comment 2 eric.savary 2004-07-23 17:25:09 UTC
->andreachnabel: please add a sample spreadsheet.

->SMC: can you test this with postresql. I cannot reporduce it with dBase tables
Comment 3 andreschnabel 2004-07-23 21:54:16 UTC
Created attachment 16744 [details]
clac sheet with example data
Comment 4 andreschnabel 2004-07-23 21:55:12 UTC
Created attachment 16745 [details]
writer file with merge field
Comment 5 andreschnabel 2004-07-23 22:00:35 UTC
->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. 
Comment 6 johnix 2005-08-04 20:43:30 UTC
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. 
 
Comment 7 wizhippo 2006-02-24 03:29:23 UTC
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.
Comment 8 wizhippo 2006-02-24 04:20:41 UTC
SQL Status: 42804

ERROR: column "birthdate" is of type date but expression is of type character
varying

only happens when using a formated datefield