Custom report creation

Hi guys, i have created a new report which shows in the reports list but it doesn’t appear with the other reports in it’s respective module,and also how do i add a query field to a new report?

First:
it the report doesn’t show in its respective place.

1- Check if the user role has “reports permission” in the doctype.
2 - If the report is created in one of the ERPNext modules and doesn’t appear you need to add it manually to the config.py file of the module.

Second:
If your report is a script report to add a filter field you need to add:

"filters": [
        {
		"fieldname": "field_name",
		"label": __("Field Label"),
		"fieldtype": "Link",
		"options": "Doctype"
	},
]
1 Like

thanks @geekroot

@geekroot ,the report is created,but from my app’s directory i don’t have a report folder and all subsequent files,the question is should i create this files manually or are they generated automatically?

Normally, are generated automatically. Your app should has a report folder inside since the app creation. When you create a new script report automatically generate a report_name/report_name.py/.js under this folder.

Query report are stored in the database not as a file.