Page 1 of 1

Writer using database records and user/input fields for multiplications

Posted: Mon Nov 10, 2025 7:15 pm
by dreamquartz
Hello All,

Question: How to use a database record value to multiply with a input filed in Writer?
I have records in a DataBse, and would like to use them in a formula, where the other part of the formula is an user field.

I am using the following:
DataBase record: <UnitPrice>
User input: NumberOfItemsSold
I am struggling with using a DataBase record in a formula that is to be used in a Writer document.

Can someone please provide some guidance?

Thanks in advance,
Dream

Re: Writer using database records and user/input fields for multiplications

Posted: Tue Nov 11, 2025 9:37 pm
by Villeroy
Having all data in the database, invoicing is possible to do with the report builder. Create a report from a record set of invoices joined with sold items per invoice. Group the report by invoice number, invoice date and recipient. Keep the sold items in the details section and do the aggregations (sums) in the report footer.

Re: Writer using database records and user/input fields for multiplications

Posted: Wed Nov 12, 2025 12:26 am
by dreamquartz
@Villeroy,

Thanks for your response.

The document is not really an invoice, but a confirmation template of work to be provided.
I put it in a Writer format, as are all the documents we create.
Manual input is done based on what is sold, and that is normally items sold.

I was looking at Insert->Field->More Fields->Variables-Insert Formula.
Here it is easy to to use an Input field, User field, or Insert Formula.
The reason for my question was and is: Next to the header 'Variables', there is the header 'Database´. Therefore, easy yes?

I am simply trying to get a record called <UnitPrice> (already in the Writer doc) multiplied by a User input, called NrOfItemsSold (already in de Writer doc, and used in more places).
I then have 3 results, that need to be 'Totalled'.
The other 2 results are all calculated, but they are all User Input.
This one is the only one that combines Base (HSQLDB) with Writer.

I am reading about links between Calc and Writer, but not so much a link between Base and Writer for calculus.

I do not quite understand if a DDE will work, but am still looking into that one, as an option.

Dream