Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version


The bottom line answer to your question is yes, you can create a report with calculated information and totals. This can also be done with a form. The problem is getting from point A (starting - where you are at) to the actual end product. There is a lot of information and planning you need to address. Much of the basic information is in the LO documentation found here -> LibreOffice Base Handbook. Further down on that wiki is a document - Tutorial: Creating a Relational Database using Base.

Usually when you have different record types there is a common factor relating them. For example, in construction you have a table for customers, then probably one for different jobs relating to a customer and within the job different items such as parts and labor which are also in different tables relating back to a particular job. Your table appears to mix different records without any relation to each other.

Once you have the necessary tables established you can set up input forms. With databases you typically do not store information which can be easily reproduced with data already stored. This would be something as parts (3 identical faucets) each with at the same cost. This total can be calculated using SQL (database communication language) when needed. There are databases which can do this as a record is entered (Firebird is one) but that requires another discussion.

After all your data is available, the data can be accumulated with SQL to either be displayed on a form or a report.

An example of this is available in my answer in this post -> Libre Data - multi-level report. There you will find a sample Base file you can download and examine. On another post, I explain how you can do different calculations within Report Builder -> How to reuse an accumulated value in a Report?.

Now while this is a lot of information to take in all at once, the best approach is to start with a correct set of tables and designing your database by not duplicating information. Then progress from there.

Please understand, this site is meant to answer specific questions and get an answer for that question such as display (or print) a calculated amount. Your question does seem to cover from inception to final product. Please insure future questions (always welcomed) and specific in nature. Future questions should typically indicate your OS, the LO version you are using (specific, not "Current") and in the case of Base, the database you are using. Currently Base can default to either HSQLDB embedded or Firebird embedded database.