Report column width formatting


I’m having an issue setting the width on my columns for this report. My guess is that some value is getting populated by a default, but I haven’t been able to track it down. The index column for one should not be that wide.

def get_columns():
	return [
		{
			"fieldname": "supplier_group",
			"label": _("Supplier Group"),
			"fieldtype": "Link",
			"options": "Supplier Group",
			"width": 160
		},
		{
			"fieldname": "supplier",
			"label": _("Supplier"),
			"fieldtype": "Link",
			"options": "Supplier",
			"width": 160
		},
		{
			"fieldname": "tax_id",
			"label": _("Tax ID"),
			"fieldtype": "Data",
			"width": 80
		},
		{

			"fieldname": "payments",
			"label": _("Total Payments"),
			"fieldtype": "Currency",
			"options": "Supplier",
			"width": 80
		}
	]
1 Like

You can do like this else you can custom html for report using Jinja

Py Example:

For Jinja Example:

Interesting… are you using this with V10 or V11 and Datatable?

Example was about v11. But i guess you can use same for v10 as well, not pretty sure.

Which version are you using? I’ve noticed strange appearance as well in V11… can you check page source and see if it’s using datatable ( and not slickgrid)
And also try a simple query report

Definitely V11 and Datatable.
I ran the Item Balance (Simple) query report. Same result. I will raise an issue.

Even for query reports the columns are not aligned with the header. Is there any fix for that?

Already updated to the most updated frappe version, and also bench clear-cache.
Installed Apps
ERPNext: v11.0.3-beta.2 () (staging)
Frappe Framework: v11.0.3 () (staging)

for general ledger and trial balance report, when there is no filter or inline filter applied there is no column width issue, but after filter applied, the width formatting issue occurred. very strange!

Seems to be fixed in staging.

Hey, that looks good! What versions are you viewing this with?