Filters in custom report

Can someone tell me what does the fields label, fieldname,fieldtype,link, options and default mean in below code and how do i identify them in the report.

frappe.query_reports[“RS_Weekly DSR Report”] = {
“filters”: [
{
‘label’: __(“Employee Name”),
‘fieldname’: ‘employee’,
‘fieldtype’: ‘Link’,
‘options’: ‘Employee’,
‘default’: ‘Type Employee Name’,
‘reqd’: 1
},
]
}

where employee = %(employee)s

left employee is your table column name, and right employee is your filter fieldname.

Label- is what label you want in report
Filename :column name in table
FieldType - Type of field i.e data field,int,float,link etc Link field refers another doctype
options will store the name of that doctype
default: It sets whatever text you entered in default as default
reqd: when filter is mandatory then reqd = 1 else reqd =0

2 Likes

Thank you @Namrata