Totals in Reports
Totals in Reports
I've created a simple report with a column containing sterling values which I would like to total and enter the result in the footer section. I've created a text box in the footer to hold the total and in the data section of the properties box have created a function e.g =sum('invvalue'). This only results in placing the value of the first item in the report.
This sort of thing is easy in access but I can't see how to do it in OpenOffice. What am I doing wrong?
This sort of thing is easy in access but I can't see how to do it in OpenOffice. What am I doing wrong?
OpenOffice 3.1 on Windows Vista
Re: Totals in Reports
Install the Sun Report Builder extension (SRB).
It's based on a professional 3rd party report engine.
It's based on a professional 3rd party report engine.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Totals in Reports
Thanks. I've loaded the SRB extension but am even more confused. I am able to place a box in the form delineated by the six green placement spots but am unable to place text in text boxes or a formula in a formatted field. None of the icons or menu items seem to provide the properties for the new entry. My operating system is Windows XP. Is this the reason as I see the post refers to Vista?
OpenOffice 3.1 on Windows Vista
Re: Totals in Reports
Hi Ricran,ricran wrote:I've created a simple report with a column containing sterling values which I would like to total and enter the result in the footer section. I've created a text box in the footer to hold the total and in the data section of the properties box have created a function e.g =sum('invvalue'). This only results in placing the value of the first item in the report.
This sort of thing is easy in access but I can't see how to do it in OpenOffice. What am I doing wrong?
I'm with you - trying to do a simple sum formula, which I used countless times in Access, but can't get it to work in Openoffice - even with the Sun Report Builder. My formula is =SUM([Order Value Pre GST]) and is placed in the report footer. It is supposed to give me a total of all the order values in the query/report. All it does is gives me the amount of the last entry in my database?? There are no groups setup - I don't believe I need them in this report since it's just a list of jobs in progress.
Any ideas anybody?
Thanks in advance,
NV
OpenOffice 3.2.0 on XP
Re: Totals in Reports
SUM must be work, please upload your file, without sensitive/confidential info, to look into.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Solved: Totals in Reports
Apologies,
I have solved my problem. I used the "Accumulation" function. I just need to make sure there are no blank dollar values.
I have solved my problem. I used the "Accumulation" function. I just need to make sure there are no blank dollar values.
OpenOffice 3.2.0 on XP
Re: Totals in Reports
The Accumulation function does work, after a fashion, but there is a trap. As nv_vs implies, if there are blank entries in the column in question an incorrect value is given by the Accumulation. It seems to total only those entries up to a point at which there are a series of blank entries. This is not what most people want. It is possible that adding an argument such as WHERE "Payment" IS NOT EMPTY might work but there is no facility to add an argument to the Accumulation function in Sun Report Builder.
The only way I have found to get a correct result is to create a query whose sole function is to sum the column, in my case it is a Payments column. A report created using this query does give the correct sum of all entries even when there are blank entries.
I have not found a way of getting this data into another report, which is also listing names and date of entry etc. Many methods have been tried.
The only way I have found to get a correct result is to create a query whose sole function is to sum the column, in my case it is a Payments column. A report created using this query does give the correct sum of all entries even when there are blank entries.
I have not found a way of getting this data into another report, which is also listing names and date of entry etc. Many methods have been tried.
OOo 3.2.0 on Mac OSX 10.6.2
Re: Totals in Reports
One can change the formula easily and make sure that NULL values are changed in correct values. Have a look to the picture and the following steps:
1: open the form navigator (F5)
locate your formula and select the properties (right-mouse)
2: Edit the formula
3: The formula wizard opens
4: Change your formula to make it 'empty value' prove (in this example empty value is replaced by 100,000, but 0 is more logical).
Save the value
5: do the save for the initial value.
I think that it is a bad idea to hide data-inconsistencies in your data model behind functions like accumulate. When you have bad data you have to take care for it. I agree with having an extra function like 'accumulate-with-NULL-as-zero'.
0: open report in edit mode1: open the form navigator (F5)
locate your formula and select the properties (right-mouse)
2: Edit the formula
3: The formula wizard opens
4: Change your formula to make it 'empty value' prove (in this example empty value is replaced by 100,000, but 0 is more logical).
Save the value
5: do the save for the initial value.
I think that it is a bad idea to hide data-inconsistencies in your data model behind functions like accumulate. When you have bad data you have to take care for it. I agree with having an extra function like 'accumulate-with-NULL-as-zero'.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Re: Totals in Reports
Many thanks to eremmel for the helpful advice on coping with null values. In fact, after additional searching on this forum I changed all null values in the calculated column to zero and made zero the default for new records. Since this was done the Accumulate function gives a correct total.
Your alternative method will be useful but I am not sure that I get the same screen options on Mac OSX.
I should say that the Accumulate function was used via the Sun Report Builder which requires OO 3.2. This has been very useful, there are certainly bugs, but the Report Builder has allowed the successful creation of reports with features that I had previously been trying to achieve but with no success.
Your alternative method will be useful but I am not sure that I get the same screen options on Mac OSX.
I should say that the Accumulate function was used via the Sun Report Builder which requires OO 3.2. This has been very useful, there are certainly bugs, but the Report Builder has allowed the successful creation of reports with features that I had previously been trying to achieve but with no success.
OOo 3.2.0 on Mac OSX 10.6.2
Re: Totals in Reports
Another way to overcome the problems associated with null values is to use the 'COALESCE' function.
I think it's sensible to tailor any query specifically for use with the report in question.
In the case of an accumulation function within Report Builder we simply need to replace null values with zeros.
1. Open report for edit.
2. Open navigator (F5).
3. Click the top line 'Report'
4. Ensure properties pane is visible. (F4) to toggle on/off.
5. Hit 'Data' tab.
6. Hit '…' gadget to right of 'Content' and Query Design window opens up.
7. Hit the triangle gadget to move from GUI to SQL.
8. Find relevant column within Select clause.
9. Change to 'COALESCE ( ColumnName , 0 )'. Replace 'ColumnName' with the actual name of your column.
10. Save and close window.
Now any NULL values will be replaced by zeros on all operating systems.
The down side of this method is that if the column is a visible column then zeros will be displayed where previously there was a blank space.
I think it's sensible to tailor any query specifically for use with the report in question.
In the case of an accumulation function within Report Builder we simply need to replace null values with zeros.
1. Open report for edit.
2. Open navigator (F5).
3. Click the top line 'Report'
4. Ensure properties pane is visible. (F4) to toggle on/off.
5. Hit 'Data' tab.
6. Hit '…' gadget to right of 'Content' and Query Design window opens up.
7. Hit the triangle gadget to move from GUI to SQL.
8. Find relevant column within Select clause.
9. Change to 'COALESCE ( ColumnName , 0 )'. Replace 'ColumnName' with the actual name of your column.
10. Save and close window.
Now any NULL values will be replaced by zeros on all operating systems.
The down side of this method is that if the column is a visible column then zeros will be displayed where previously there was a blank space.
open office 4.1.14 & LibreOffice 6.4.4.2 x64 using HSQL 1.8.0.10 (Embedded) and HSQL 2.6.0 (Split) on Windows 10
Re: Totals in Reports
Has anyone solved this. I have not been able to get totals in the report footer. I can get it in the group footer but when I move it to the report footer I only get the first record amount.
OpenOffice 3.3.0 Running on Ubuntu 10.10 ORB 1.2.1 ver2
Re: Totals in Reports
You need separate counter for groups, and another one for whole report.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Totals in Reports
I think I have been doing that. I looks like the grouping and functions have changed over the years so I may not have it correct. Below is what the navigator looks like.
Thanks
Thanks
OpenOffice 3.3.0 Running on Ubuntu 10.10 ORB 1.2.1 ver2
Re: Totals in Reports
Sorry Here's the Navigator
Here's the Sub Total Function
Here's the Total Function
OpenOffice 3.3.0 Running on Ubuntu 10.10 ORB 1.2.1 ver2
Re: Totals in Reports
You put the report total into page footer, the better place is report footer, if you have no specific reason to put into page footer.
See my example file atteched here.
See my example file atteched here.
- Attachments
-
- totals.odb
- (29.06 KiB) Downloaded 595 times
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Totals in Reports
Thank you! I see that. Thanks for the example!
The only reason I liked the page footer was to fix the total to the bottom of the page.
The only reason I liked the page footer was to fix the total to the bottom of the page.
OpenOffice 3.3.0 Running on Ubuntu 10.10 ORB 1.2.1 ver2