sorry for being noisy, but i have a problem that gets me crazy.
I have a mysql database registered with base.
I did a table of writer and connected some fields to cells of that table. i can perfectly print all documents.
But now I want to have a cell which must have as a value the sum of 6 cells.
I explain better.
In that table I have 6 cells which take value directly from db( they are integers) and i would like to have 7th cell which must be the sum of previous 6 cells. In sql it would be SELECT SUM(1+2+3+4+5+6) GROUP BY id.
How can I do?
Sorry, but perhaps I don't know something, because formula =sum<B1:B6> gives me an error in inserting formula (also = sum>B1:B6> does the same).
I'm getting crazy
Thanks
Title Edited. A descriptive title for posts helps others who are searching for solutions and increases your chances of a reply. (TheGurkha, Moderator)
[Solved] Need to add Base values in Writer Table Cell
[Solved] Need to add Base values in Writer Table Cell
Last edited by Hagar Delest on Sun Oct 25, 2009 11:36 am, edited 1 time in total.
Reason: Tagged as solved
Reason: Tagged as solved
Openoffice 3.1 on linux ubuntu 9.04
Re: Need to add Base values in Writer Table Cell
I have never used formulas in Writer tables, so there may be a better way to do this. This works in a table I created.
I found this by clicking inside the table, going to Table -> Formula and using the function wizard that is becomes available on the formula bar that appears among the tool bars at the top.
Code: Select all
=sum(<B1>|<B2>|<B3>|<B4>|<B5>|<B6>)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Need to add Base values in Writer Table Cell
If you can do the calculation in a query, I would trust that more than using Writer's formulas, but that's just my opinion.
Anyway, using a table formula seems to work for me: =sum <B2:B4>
Here's a sample that uses the biblio database that comes with OOo.
To refresh the data, just open the database viewer (F4), navigate to the "biblio" table, select some rows and click the "Data to Fields" button.
Anyway, using a table formula seems to work for me: =sum <B2:B4>
Here's a sample that uses the biblio database that comes with OOo.
To refresh the data, just open the database viewer (F4), navigate to the "biblio" table, select some rows and click the "Data to Fields" button.
- Attachments
-
- db_calc.odt
- (8.42 KiB) Downloaded 196 times
AOO4/LO5 • Linux • Fedora 23
Re: Need to add Base values in Writer Table Cell
So much noise for nothing...sorry, I discovered it was easier than i thought: it was enough to give instructions to cells before connecting cells to database.Everything is fine,now.Sorry for my stupidity.