Issue 77039 - RPT: date time field does not work
Summary: RPT: date time field does not work
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: recent-trunk
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: new_implementation
: 77097 77606 79163 (view as issue list)
Depends on: 78685
Blocks:
  Show dependency tree
 
Reported: 2007-05-07 15:08 UTC by marc.neumann
Modified: 2008-01-27 22:22 UTC (History)
4 users (show)

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


Attachments
document showing various formattings which are not properly recognized by Writer (18.98 KB, application/vnd.sun.xml.base)
2007-06-13 11:20 UTC, Frank Schönheit
no flags Details
document resulting from executing the "currency" report (28.61 KB, application/vnd.oasis.opendocument.text)
2007-06-13 11:24 UTC, Frank Schönheit
no flags Details
document resulting from executing the "date + time" report (29.10 KB, application/vnd.oasis.opendocument.text)
2007-06-13 11:25 UTC, Frank Schönheit
no flags Details
document resulting from executing the "plain numeric" report (28.58 KB, application/vnd.oasis.opendocument.text)
2007-06-13 11:25 UTC, Frank Schönheit
no flags Details
database doc with report containing only a time-formatted field in the detail section (53.82 KB, application/vnd.sun.xml.base)
2007-06-20 19:24 UTC, Frank Schönheit
no flags Details
report definition, as passed to the reporting engine (2.83 KB, application/vnd.oasis.opendocument.text)
2007-06-20 19:25 UTC, Frank Schönheit
no flags Details
report, as generated by the reporting engine (3.61 KB, application/vnd.oasis.opendocument.text)
2007-06-20 19:25 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description marc.neumann 2007-05-07 15:08:12 UTC
1. open a new database
2. open a new report designer
3. insert a text control and connect to any field
4. insert any date time via the date time dialog
5. execute the report
==>> the page number is not displayed correctly
Comment 1 marc.neumann 2007-05-07 15:08:41 UTC
add keyword new_implementation
Comment 2 ocke.janssen 2007-05-11 13:06:14 UTC
Date and time function are correctly inserted into the report but the report
engine doesn't not produce correct values.
Comment 3 Frank Schönheit 2007-05-15 09:33:02 UTC
The Report Designer iTeam decided that this issue is a show stopper for the
release of the report designer. Targeting to 2.3, thus.
Comment 4 ocke.janssen 2007-05-25 09:28:46 UTC
The NOW() function doesn't return the time value in the correct time zone.
Please take care for it. Thanks.
Comment 5 ocke.janssen 2007-06-01 07:54:04 UTC
*** Issue 77606 has been marked as a duplicate of this issue. ***
Comment 6 tmorgner 2007-06-06 17:09:49 UTC
We now have an implementation that produces XML-code that is valid according to
the File-Format specifcation. However, the Writer still ignores the format.
Chances are high, that the writer also does not want to play nice with the
generated documents ..
Comment 7 tmorgner 2007-06-06 17:12:01 UTC
*** Issue 77097 has been marked as a duplicate of this issue. ***
Comment 8 ocke.janssen 2007-06-08 11:49:56 UTC
Andreas please care take for this. Thanks.
Comment 9 Frank Schönheit 2007-06-13 11:20:03 UTC
Created attachment 45864 [details]
document showing various formattings which are not properly recognized by Writer
Comment 10 Frank Schönheit 2007-06-13 11:23:44 UTC
The attached database document contains three reports (which I'll also attach as
final writer documents in a minute):
- "currency" formats the "Population" cell of the detail section as currency,
  which isn't reflected at all in the resulting document
- "date + time" has two fields with a date resp. time formatting, but the
  resulting formatting in the final text document is completely different
  from what is specified at the fields
- "numeric" formats the "Population" cell of the detail section as numeric
  value with thousands separator and two digits, which isn't respected at all
  in the resulting document.

I am not sure if all those are the same bug. I assembled them from all the
issues which are marked as duplicate of this issue here (or duplicate of a
duplicate), and oj claimed that we now write proper formatting, but Writer
doesn't respect them. Please investigate whether we need to separate those
issues, again.
Comment 11 Frank Schönheit 2007-06-13 11:24:33 UTC
Created attachment 45865 [details]
document resulting from executing the "currency" report
Comment 12 Frank Schönheit 2007-06-13 11:25:23 UTC
Created attachment 45866 [details]
document resulting from executing the "date + time" report
Comment 13 Frank Schönheit 2007-06-13 11:25:55 UTC
Created attachment 45867 [details]
document resulting from executing the "plain numeric" report
Comment 14 andreas.martens 2007-06-14 09:48:37 UTC
In the ODF there is redundant information about the content of "value" cells.
There is the content as plain text as well as value with formatting property.
Until now the Writer displayed the plain text which has been stored in the file.
If this doesn't fit to the wished value/format the issue occurred.
I changed this behavior in the following way: During the document load process
the content of the "value boxes" will be recalculated, the plain text
information will be ignored.
With this change the bug documents looks different, e.g. we got the thousands
seperator and _four_ digit in the numeric bug document.
Comment 15 andreas.martens 2007-06-14 09:50:00 UTC
Fixed in oj14
swtable.hxx
swtable.cxx
xmltbli.cxx
Comment 16 Frank Schönheit 2007-06-14 21:58:10 UTC
fs->ama: you're my hero - I know you've been busy with other important things,
thanks for fixing this.

The fix looks fine, except a *small* thing: The time field does not seem to work
- it always displays 000000.

I am not sure whether this is a bug of the engine or of the Writer. Looking at
the generated report doc, there are the following attributes:
office:date-value="2007-06-14T10:35:59.0Z"
office:time-value="PT00H00M00S"
office:value-type="time"

There's various issues with this:
- the time-value is surely wrong
- the date-value value looks good, but: It was 22:35:59 when I generated the report,
  that is, the time part misses the fact that it was PM, not AM
- either the time part of date-value, or the time-value is redundant. I am not sure
  what the ODF spec says about both attributes being present, but I think
  we should write only one - shouldn't we?

When I remove the flawed time-value attribute, then 103559 is displayed in the
respective fields, which is still wrong - the formatting in the report design
specifies it should be 10:35:59.
Comment 17 Frank Schönheit 2007-06-14 21:58:36 UTC
fs->tmorgner: re-assigning to you, for further investigation of the time field
problem (see above)
Comment 18 andreas.martens 2007-06-18 09:45:40 UTC
ama->fs: Small formatting problem: 103559 is displayed because the used
time-style does not define seperators between hours, minutes and second...
  <number:time-style style:name="N123">
   <number:hours number:style="long"/>
   <number:minutes number:style="long"/>
   <number:seconds number:style="long"/>
  </number:time-style>
If you want ':' as seperator, it should be...
  <number:time-style style:name="N123">
   <number:hours number:style="long"/>
   <number:text>:</number:text>
   <number:minutes number:style="long"/>
   <number:text>:</number:text>
   <number:seconds number:style="long"/>
  </number:time-style>
Comment 19 tmorgner 2007-06-18 13:00:03 UTC
As we are only copying the styles that are already existent in the
Report-Definition file, this must be an issue of the report-designer itself. The
report designer has to write the separator out so that we can copy this element.
Comment 20 Frank Schönheit 2007-06-20 19:21:48 UTC
fs->tmorgner: Nope. I'll attach files proving this in a second.
Comment 21 Frank Schönheit 2007-06-20 19:22:24 UTC
fs->tmorgner: Nope. I'll attach files proving this in a second.
Comment 22 Frank Schönheit 2007-06-20 19:24:35 UTC
Created attachment 46104 [details]
database doc with report containing only a time-formatted field in the detail section
Comment 23 Frank Schönheit 2007-06-20 19:25:05 UTC
Created attachment 46105 [details]
report definition, as passed to the reporting engine
Comment 24 Frank Schönheit 2007-06-20 19:25:36 UTC
Created attachment 46106 [details]
report, as generated by the reporting engine
Comment 25 Frank Schönheit 2007-06-20 19:28:56 UTC
fs->tmorgner: Unzip report_definition.odt, and look into content.xml. You'll find
<number:time-style style:name="N5041"
                   number:language="de"
                   number:country="DE">
 <number:hours number:style="long"/>
 <number:text>:</number:text>
 <number:minutes number:style="long"/>
 <number:text>:</number:text>
 <number:seconds number:style="long"/>
</number:time-style>

As you can see, the : is present in the style definition.

Feed this file into the engine, and you'll get a file like generated_report.odt.
Unzip it, look into content.xml, you'll find:
<number:time-style number:language="de"
                   number:country="DE"
                   style:name="N5041">
 <number:hours number:style="long"/>
 <number:text/>
 <number:minutes number:style="long"/>
 <number:text/>
 <number:seconds number:style="long"/>
</number:time-style>

As you can see, the colons are gone.

=> this is a bug in the engine, not in the report designer
Comment 26 christoph.lukasiak 2007-07-04 13:22:47 UTC
*** Issue 79163 has been marked as a duplicate of this issue. ***
Comment 27 tmorgner 2007-07-26 13:32:56 UTC
The formatted-text-layout controller did not look for the correct node,
and therefore never found the expected 'office:value-type' attribute.
This now fixes the #78502 bug, and possibly addresses the #77039 bug as
well (although this bug might be connected to a writer-bug). 

However, the writer does not seem to pick up the values from the 'office:value'
attributes - it only displays the contents of the paragraph of the cell.
However, the paragraph's contents are not formatted in any way and thus the
displayed text still *looks* wrong.

According to Ocke, this is a known bug in the writer (i78685)
Comment 28 tmorgner 2007-07-26 13:33:59 UTC
Seems that Issue 78685 is fixed already. 
Comment 29 Mechtilde 2007-07-30 12:19:41 UTC
add as CC
Comment 30 ocke.janssen 2007-08-01 08:56:11 UTC
The issue isn't fixed yet. There seems to be some problems in writer formatting.
Comment 31 ocke.janssen 2007-08-01 08:56:42 UTC
Please take care for this. Thanks.
Comment 32 Frank Schönheit 2007-08-22 08:45:07 UTC
fs->oj: Given the high number of duplicates for this issue, and its long and
varying history, could you please elaborate what problems are left and to be
fixed? Else, it is really difficult to judge the state/importance of this issue.
Thanks.
Comment 33 andreas.martens 2007-12-13 10:56:09 UTC
ama->oj: At the moment I do not know which Writer formatting is wrong.
Could you please check this and provide a bug document which shows any remaining
problem?
Or this issue solved already?
Comment 34 ocke.janssen 2007-12-14 08:46:39 UTC
@ama: The issue with the currency field still occurs. Please have a look at the
bug doc http://www.openoffice.org/nonav/issues/showattachment.cgi/45865/currency.odt

- oj
Comment 35 ocke.janssen 2008-01-08 06:07:34 UTC
Grabbing this issue again. Found an issue in the export filter.
Comment 36 ocke.janssen 2008-01-08 06:08:36 UTC
Fixed in cws reportdesign02
Comment 37 ocke.janssen 2008-01-08 15:07:31 UTC
Please verify. Thanks.
Comment 38 marc.neumann 2008-01-16 11:49:25 UTC
The bugdoc 
http://www.openoffice.org/nonav/issues/showattachment.cgi/45864/i77039.odb works
as expected.

verified in CWS reportdesign02

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Freportdesign02
Comment 39 drewjensen.inbox 2008-01-27 22:01:09 UTC
Alright another one I that I don't see how it is fixed. Unless this is language
specific on the fix.

So far only tested currency. Using En_US as the local and selecting a currency
format the result has a '-' before every value. To remove this you must update
the standard (supplied) format string(s) to remove the '-', creating a custom
format. It also makes it impossible to actually have '-' when the value is negative.

If you need I'll put up a pdf file with the results of a report using a standard
currency format string as a bug doc. But you ( I ) can get it just by opening
the currency report in the attached bug doc.


Comment 40 drewjensen.inbox 2008-01-27 22:17:21 UTC
Sorry - I realize this is ONLY for the date time. Currency is just mentioned here. 

OK - tested just date time.

This should still be reopened.

Add new table to bug doc, id integer, d date, t time, dt datetime.
Entered the following data
0, 2007-10-01, 10:15:25, 2007-10-01 10:15:25

Created report with all four fields in detail section.
Date format is correct
- format string used = 'January 27, 2008'
- value displayed in report = October 1, 2007

Time format is correct
- format string used = '05:14 PM'
- value displayed in report = 10:15 AM

datetime is NOT correct
- format string used = '12/30/99 05:12 PM" 
- value displayed in report = 2007-10-01 10:15:25

But I'll will not reopen, in case it is desired to treat this as a separate issue.
Comment 41 drewjensen.inbox 2008-01-27 22:22:32 UTC
Well- now I am both apologizing and feeling foolish.

My new table was wrong the last field was text not date time.

Correct and all formatting in report was accurate

datetime is correct
- format string used = '12/30/99 05:12 PM" 
- value displayed in report = 10/01/07 10:15 AM

Closing - and finishing testing for the day..