Is there any way to use frappe.db.get_value in custom report print format


I created a custom report, In that report folder I created html file, I tried to use frappe.db.get_value its not working ? how to use database api’s in custom html file

Please check the base report:

The function frappe.db.get_value isn’t used in any standard report for printing formats but you can use it for custom print format for the doctype.

You can use {{doc.field_name}} to retrieve the field of the doctype on which u r creating a custom print.

For ex: You are creating a custom print format for “Sales Order” doctype, and you want to retrieve field “Customer” then you write is as {{doc.customer}}.


I unserstood that we can get the data by using {{}}, but currently I am not creating print format for doctype, I am creating print format for report. In that we are not able to use {{}} and also I want to fetch the data to the html file from another doctype by using database api’s,