Page 1 of 1
Sum column in Standard report
Posted: Tue Jan 14, 2014 5:25 pm
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.
Re: Sum column in Standard report
Posted: Sun Jan 26, 2014 8:02 am
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.
Re: Sum column in Standard report
Posted: Sun Jan 26, 2014 10:28 am
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!
Re: Sum column in Standard report
Posted: Sun Jan 26, 2014 2:03 pm
by mgroenescheij
Thanks Villeroy didn't know the UNION ALL statement.
learned something new today.
Re: Sum column in Standard report
Posted: Mon Jan 27, 2014 12:18 am
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?
...
Re: Sum column in Standard report
Posted: Mon Jan 27, 2014 1:01 am
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.
Re: Sum column in Standard report
Posted: Tue Jan 28, 2014 1:20 am
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.
