GNOME Bugzilla – Bug 669281
Field summary, sum is not working
Last modified: 2012-02-03 12:02:59 UTC
Created attachment 206662 [details] screenshot of customer report For summary fields sum is not working on report
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.
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.