Apache OpenOffice (AOO) Bugzilla – Issue 77039
RPT: date time field does not work
Last modified: 2008-01-27 22:22:32 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
add keyword new_implementation
Date and time function are correctly inserted into the report but the report engine doesn't not produce correct values.
The Report Designer iTeam decided that this issue is a show stopper for the release of the report designer. Targeting to 2.3, thus.
The NOW() function doesn't return the time value in the correct time zone. Please take care for it. Thanks.
*** Issue 77606 has been marked as a duplicate of this issue. ***
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 ..
*** Issue 77097 has been marked as a duplicate of this issue. ***
Andreas please care take for this. Thanks.
Created attachment 45864 [details] document showing various formattings which are not properly recognized by Writer
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.
Created attachment 45865 [details] document resulting from executing the "currency" report
Created attachment 45866 [details] document resulting from executing the "date + time" report
Created attachment 45867 [details] document resulting from executing the "plain numeric" report
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.
Fixed in oj14 swtable.hxx swtable.cxx xmltbli.cxx
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.
fs->tmorgner: re-assigning to you, for further investigation of the time field problem (see above)
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>
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.
fs->tmorgner: Nope. I'll attach files proving this in a second.
Created attachment 46104 [details] database doc with report containing only a time-formatted field in the detail section
Created attachment 46105 [details] report definition, as passed to the reporting engine
Created attachment 46106 [details] report, as generated by the reporting engine
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
*** Issue 79163 has been marked as a duplicate of this issue. ***
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)
Seems that Issue 78685 is fixed already.
add as CC
The issue isn't fixed yet. There seems to be some problems in writer formatting.
Please take care for this. Thanks.
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.
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?
@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
Grabbing this issue again. Found an issue in the export filter.
Fixed in cws reportdesign02
Please verify. Thanks.
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
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.
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.
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..