for your refrence check this post https://discuss.frappe.io/t/create-custom-print-format-for-a-script-report/147623 @zahraa