We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f83b744 + 87c3c71 commit 4b84dcdCopy full SHA for 4b84dcd
1 file changed
frappe/core/doctype/report/report.py
@@ -416,9 +416,10 @@ def get_report_module_dotted_path(module, report_name):
416
417
def get_group_by_field(args, doctype):
418
if args["aggregate_function"] == "count":
419
- group_by_field = "count(*) as _aggregate_column"
+ group_by_field = {"COUNT": "*", "as": "_aggregate_column"}
420
else:
421
- group_by_field = f"{args.aggregate_function}({args.aggregate_on}) as _aggregate_column"
+ func_name = args["aggregate_function"].upper()
422
+ group_by_field = {func_name: args["aggregate_on"], "as": "_aggregate_column"}
423
424
return group_by_field
425
0 commit comments