ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

2 Source Document in on Table Script Report

Hi. I want to create a script report where I will need to fetch data from 2 different doctypes. Can I do that and how?

Hi @Rabie_Moses_Santilla,

here you have some information about the script reports you might have not seen yet:

With a script report you can do nearly everything and your requirements should also be possible.

You can set you own filters to select your data, define your own column layout, fetch your data with some python functions, merge them together to the needed result and at the end return the data.

If you just want to fetch data from parent and child table, you only need to get the parent in python for example with:

frappe.get_doc("Parent DocType", name)

and then you have all data from parent and child doctype.

I hope this could help you a bit and cleared out some questions