Sum column in Standard report

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

Sum column in Standard report

Post by pinco pallo »

Hello, I am looking for help to understand how it fits a formula, such as the sum of a column directly in a Report of Base. By extending Oracle Report Builder, I did get reports that are aesthetically unwatchable (maybe for my ignorance) and I prefer the standard wizard that I find aesthetically acceptable. I attach a small example. Thank you.
Attachments
Test.odb
(29.6 KiB) Downloaded 320 times
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Sum column in Standard report

Post by mgroenescheij »

The build in database doesn't support a UNION select.

I strongly suggest that you install an external database e.g. MySQL
A build in database has disadvantages e.g. if your report crashes you lose also the database and your only able to update from within that document.
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Sum column in Standard report

Post by Villeroy »

mgroenescheij wrote:The build in database doesn't support a UNION select.
It does: http://www.hsqldb.org/doc/1.8/guide/ch0 ... ct-section

Try in "direct SQL" mode:

Code: Select all

SELECT "Number" FROM "Table1"
UNION ALL SELECT
SUM( "Number" ) AS "sum" FROM "Table1"
mgroenescheij wrote:I strongly suggest that you install an external database e.g. MySQL
Absolutely!
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
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Sum column in Standard report

Post by mgroenescheij »

Thanks Villeroy didn't know the UNION ALL statement.
learned something new today.
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Sum column in Standard report

Post by DACM »

mgroenescheij wrote:I strongly suggest that you install an external database e.g. MySQL
A build in database has disadvantages e.g. if your report crashes you lose also the database and your only able to update from within that document.
Well, lets not misconstue the reality of the situation. The default "embedded database" document-type has severe "disadvantages" due to bugs in Base. But you can connect to the bundled HSQLDB 1.8 engine in much the same way as you would connect to a MySQL server -- for equal reliability. The only difference is the MySQL server is far more difficult to setup and use on a daily basis than HSQLDB with Base -- perhaps specifically in single-user mode using a Base template which automatically creates an HSQLDB 2.3.x database through Base. In general, MySQL has no advantage over HSQLDB serving less than 100 concurrent users through a Base front-end. In fact, there's only disadvantages with MySQL relative to typical Base environments on every point of comparison including: speed, database portability, ease of setup, daily server admin, SQL depth-of-features and standardization, etc.

Perhaps see: Which Would Make for a Better Back-End, MySQL or HSQLDB?
...
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Sum column in Standard report

Post by mgroenescheij »

The discussion was embedded or external.
It was not my intention to start a discussion of which database is better, I have no knowledge about that hence I used MySQL as an example.
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Sum column in Standard report

Post by DACM »

mgroenescheij wrote:The discussion was embedded or external.
My sincere apologies. I was being over-sensitive in the defense of Base users who would simply give-up on Base if a full-blown RDBMS server like MySQL became necessary for reliable or full-featured database access. ;)
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Post Reply