Fetching data from a Link Type filter to a read only filter

How I can fetch data from a link type filter (When selected or changed) to an other filter?
See below image for example.

Reason to fetch data in another filter so that i can use it in html file for print purpose. Because i want to show student name in transcript report print.
Is there any other way to send variables to html file except filters and columns? I want to send more information when I print the report.
Please help.

One more thing, i am trying to use frappe.get_doc to get data, but when i use below code it is returning NULL

frappe.get_doc(":Student", "S1618016")

I have this student “S1618016” in students table

frappe.get_doc("Student", "S1618016")
There shouldn’t be ‘:’ when specifying the DocType name

I tried without it too but not working

I copied the code from

here they are using frappe.get_doc(":Company", filters.company)

But for me with or without : its not working

Have a look at this file, might help you achieve what you want to do.

1 Like

Have you tried get_query?
Assume S1618016, its fieldname is “name”

In student name Link Type filters.
“get_query”: function() {
var name = frappe.query_report_filters_by_name.name.get_value();
return {
“doctype”: “Student”,
“filters”: {
“name”: name,

Thanks this really helped