On 10/07/2007 10:38 AM, [EMAIL PROTECTED] wrote: > Hi, > > I'm creating a form, in Writer, from scratch, using the Form Controls > widgets, for travel expenses. There's no corresponding database. There are > the following types of fields: > > Travel: $1000 > Food: $80 > Other: $100 > > Total: $1180 > > My question is, how do I create a field that automatically calculates the > total? > > I've tried doing what works on a report when you're connected to a database, > but it doesn't work. (Using a numerical field type, then typing Select > SUM(fieldname as totalfieldname).) > http://searchenterpriselinux.techtarget.com/tip/0,289483,sid39_gci1260586,00.html > > > Thanks, > Solveig
I don't think you can can via Forms without a database. You can however do this via Tables: Calculating the sum of a series of table cells 1.Choose Insert - Table, and insert a table with one column and more than one row into a text document. 2.Type a number in each cell of the column, but leave the last cell in the column empty. 3.Place the cursor in the last cell of the column, and then click the Sum icon on the Table Bar. The Formula Bar appears with the entry "=sum". 4.Click in the first cell of the series you want to sum up, drag to the final cell, and then release. OpenOffice.org inserts a formula for calculating the sum of the values in the current column. 5.Press Enter, or click Apply in the Formula bar. The sum of the values in the current column is entered in the cell. If you enter a different number anywhere in the column, the sum is updated as soon as you click in the last column cell. Similarly, you can also quickly calculate the sum of a row of numbers. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
