How to Get value from another document in script report?

I can Get value from another document in Print Format.

frappe.db.get_value("[doctype]", "[name]", "fieldname")

How to Get value from another document in script report ?

Same script should work. Did you try?

Thank rmehta.
In General Leger report. in file : general_leger.html
I want to get Addrees company.

<h2 class="text-center">{%= __("Statement of Account") %}</h2>
<h4 class="text-center">{%= filters.account && (filters.account + ", ")  || "" %} {%= filters.company %}</h4>
<h2 class="text-center">{%= frappe.db.get_value("Company", filters.company, "address") %}</h2>

It error.
JackLe

Hi, rmehta
I want to view company address in Gerneral Leger report. How to do that ?
JackLe

This is the print format and is generated on the client side. You can’t use python functions here.

Make a letter head based on company name. All letter heads are loaded in boot so you can use:

{%= frappe.boot.letter_heads["my company letterhead"] %}

Thanks, rmehta.
I don’t understand . Can you explain to me ?.
I want to view company address in Gerneral Leger report.
Can you review some code ?
I think it likes Scrip in Print Format. But I can’t do that.
JackLe,

What did you not understand? Did you try my suggestion?

Hi rmehta.

I want to view my company address.

How can i do that ?
Jack Le.

Add your address in your letter head.

Or you can send your company address via boot.py and then access it in the client site at frappe.boot.address

@rmehta I have create python function to get the Customer address from sales Invoice. Now I want to replicate this address in Custom Script Report. I am trying with jinja. but I am not getting address into report.