After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669281 - Field summary, sum is not working
Field summary, sum is not working
Status: RESOLVED FIXED
Product: glom
Classification: Other
Component: reports
1.21.x
Other Linux
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2012-02-02 20:49 UTC by alien
Modified: 2012-02-03 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of customer report (79.72 KB, image/png)
2012-02-02 20:49 UTC, alien
Details

Description alien 2012-02-02 20:49:46 UTC
Created attachment 206662 [details]
screenshot of customer report

For summary fields sum is not working on report
Comment 1 Murray Cumming 2012-02-03 11:35:28 UTC
Confirmed. And I see these errors on the command line:

Glib::RefPtr<Gnome::Gda::DataModel> Glom::DbUtils::query_execute_select(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>&, bool): code=SERVER_PROVIDER_STATEMENT_EXEC_ERROR, message=column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 1.000000 ORDER BY "invoices"...
                                                             ^
Glib::RefPtr<Gnome::Gda::DataModel> Glom::DbUtils::query_execute_select(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>&, bool): Error while executing SQL: 
  SELECT 
	SUM ("invoices"."price_total"), 
	SUM ("invoices"."price_total_with_vat")
FROM "invoices"
WHERE "invoices"."contact_id" = 1.000000
ORDER BY "invoices"."invoice_id" ASC

static bool Glom::ConnectionPool::handle_error_cerr_only(): Internal error (Database): column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 1.000000 ORDER BY "invoices"...
                                                             ^
static bool Glom::ConnectionPool::handle_error_cerr_only(): Internal error (Database): column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 1.000000 ORDER BY "invoices"...
                                                             ^
column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 1.000000 ORDER BY "invoices"...
                                                             ^
Glib::RefPtr<Gnome::Gda::DataModel> Glom::DbUtils::query_execute_select(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>&, bool): code=SERVER_PROVIDER_STATEMENT_EXEC_ERROR, message=column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 0.000000 ORDER BY "invoices"...
                                                             ^
Glib::RefPtr<Gnome::Gda::DataModel> Glom::DbUtils::query_execute_select(const Glib::RefPtr<const Gnome::Gda::SqlBuilder>&, bool): Error while executing SQL: 
  SELECT 
	SUM ("invoices"."price_total"), 
	SUM ("invoices"."price_total_with_vat")
FROM "invoices"
WHERE "invoices"."contact_id" = 0.000000
ORDER BY "invoices"."invoice_id" ASC

static bool Glom::ConnectionPool::handle_error_cerr_only(): Internal error (Database): column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 0.000000 ORDER BY "invoices"...
                                                             ^
static bool Glom::ConnectionPool::handle_error_cerr_only(): Internal error (Database): column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 0.000000 ORDER BY "invoices"...
                                                             ^
column "invoices.invoice_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: ...WHERE "invoices"."contact_id" = 0.000000 ORDER BY "invoices"...
                                                             ^
std::string Glom::ReportBuilder::report_build_and_save(const Glom::FoundSet&, const Glom::sharedptr<const Glom::Report>&): temp_uri=file:///tmp/glom_printoutNQZ18V


I should be able to add test code for this too.
Comment 2 Murray Cumming 2012-02-03 12:02:59 UTC
Fixed by this commit, which also adds a test to detect if it stops working again:
http://git.gnome.org/browse/glom/commit/?id=f0c2ed90b12cc91c1b68d045ccc3ea5a996509ac

Thanks. Your testing is very useful. In case you want to have credit for your work, you might want to change your Bugzilla details to show your real name.