Having trouble with navigating from script-report to a custom doctype!

Im trying to navigate from my custom report to a custom doctype on a button action, Basically it should navigate to the new doctype form of my custom doctype with all the data i send from my report.
But the problem is im unable to send all the data through

var cont = get_new_container(foreign_buyer, final_destination, doc)
frappe.set_route(“Form/DoctypeName/New Doc”, cont)

my custom doctype as child table for which i want to insert data based on the report button click.

i have tried doing it from python by creating
doc = frappe.new_doc(‘DocTypeName’)
doc.foreign_buyer = foreign_buyer
doc.final_destination = final_destination

		for sd in so_details:
			child = {
				'so_no': sd.name,
				'item': sd.item_code,
				'pallet_size': sd.pch_pallet_size,
				'so_qty': sd.qty,
				'final_destination': sd.final_destination,
				'customer_po_number': sd.po_no,
				'so_date': sd.delivery_date,
				'initial_delivery_date': sd.transaction_date

		doc.container_details = cont_child
		return frappe.as_json(doc)

Im not getting how im supposed to achieve the functionality i need, any help regarding this would be very helpfull