Issue 77785 - Formula fields don't calculate properly in a table.
Summary: Formula fields don't calculate properly in a table.
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.2
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2007-05-25 09:16 UTC by mp035
Modified: 2017-05-20 11:17 UTC (History)
1 user (show)

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

This is the document that showed the problem described in the issue. (10.81 KB, text/xml)
2007-05-25 09:19 UTC, mp035
no flags Details
Sample document with correct formula calculations (11.02 KB, application/vnd.sun.xml.writer)
2007-11-27 17:18 UTC, Joe Smith
no flags Details
THis documane still displays the problem as of OOo 2.3 (10.81 KB, application/vnd.sun.xml.writer)
2007-12-06 22:42 UTC, mp035
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mp035 2007-05-25 09:16:11 UTC

I am using Ubuntu 6.10 (Edgy) with OOo 2.1.

To reproduce the problem, open this document:

It is a sheet of labels kept in format using a table.

Change the serial number of the first label, the other labels should change 
serial number to match, incremented by 1 each label.
Notice that the first label in the middle column has the same serial number as 
the first label in the first column (startsernum) even though it is set to [ 
startsernum + 11 ],  Interestingly if you replace the defective serial number 
field with standard text, the first label in the right column then calculates 

You can muck around with replacing the fields, and all looks fine until you 
try to print, then OOo recalculates the fields, and prints the defective value 
(that's when I start banging my head on the desk :-)  ). 

Also, I was unable to insert the formula fields directly, I had to insert them 
outside the table, then cut and paste them into place.  To replicate this, go 
to Insert->Fields->Other->(Variables Tab)->  Select "Insert Formula" in the 
left hand list, type your preferred formula (try startsernum + 10), click on a 
position in one of the table cells and click insert.  Nothing happens, but if 
you do the same thing, but instead of clicking inside a cell, click outside 
the table, then click insert, it works fine.

Keep up the good work.  I am trying to stop using ms office all together, but 
I do a lot of label and form printing, and OOo is not quite stable enough yet, 
but I'm sure it will be soon.  Many thanks for your hard work.
Comment 1 mp035 2007-05-25 09:19:00 UTC
Created attachment 45385 [details]
This is the document that showed the problem described in the issue.
Comment 2 michael.ruess 2007-05-25 10:05:44 UTC
Reassigned to ES.
Comment 3 eric.savary 2007-05-30 15:26:21 UTC
@OS: please have a look. reproduced in m207

@mp035: Please file another issue for the impossibility to insert such a field
in this document.
Comment 4 Martin Hollmichel 2007-09-10 13:36:28 UTC
move target to 3.x according
Comment 5 Joe Smith 2007-11-27 17:17:25 UTC
There are a number of problems with the sample document, but not the one
described in the summary.

I have attached a sample document that uses fields to calculate the serial
numbers correctly (I think).

Since it seems that the intention is for the serial numbers to increment by
columns instead of the natural row order, I had to add variables for row and
column, then calculate the serial numbers from them. The row/column is
calculated and displayed in each cell; it can be hidden by changing the "_rc"
character style to Font Effects: Hidden.

I also saw the same problem with inserting a formula field in the table, and
also had to use the workaround.

If the submitter can review this, and agrees with my results, perhaps the
summary should be changed, or this should be closed and a new issue opened for
the formula insert problem.
Comment 6 Joe Smith 2007-11-27 17:18:46 UTC
Created attachment 49945 [details]
Sample document with correct formula calculations
Comment 7 Joe Smith 2007-11-27 17:19:35 UTC
BTW, I'm using 2.3 on Fedora 8
Comment 8 mp035 2007-12-06 22:42:34 UTC
Created attachment 50164 [details]
THis documane still displays the problem as of OOo 2.3
Comment 9 mp035 2007-12-06 22:54:20 UTC
jes is right, for some reason the original example document no longer shows the
problem, but my local copy still does.  I have attached a copy of my local file
that still exhibits the calculation problem.  

To reproduce, open the document table2.odt, all fields should appear to be
calculated in order.  Go to tools -> update -> update all, and the field at the
top of the second column is no longer calculated correctly.  
Comment 10 Marcus 2017-05-20 11:17:30 UTC
Reset assigne to the default "".