Script Report for filter

Hello actually i have created according to script report video but there i have added one field as MSME Supplier that is dropdown option like “Yes” and “No”

basically in my Supplier Document i have one field as MSME dropdown yes or no so i want to functionality in report like when i will select the Yes in this dropdown of report then that records should show who has the MSME yes in the supplier document basically moto is only msme supplier records should if i selected yes then and if i selected no then remaining ones should show how can i achieve this logic? i was trying to do but that is not working

Hii @sk17

Update your existing code line with this and try i hope it’s works :

if msme_filter:
            if msme_filter == "Yes":
                self.filters["additional_conditions"] = f" AND `tabSupplier`.msme = 'Yes'"
            elif msme_filter == "No":
                self.filters["additional_conditions"] = f" AND (`tabSupplier`.msme = 'No' OR `tabSupplier`.msme IS NULL OR `tabSupplier`.msme = '')"

Not working can we print there on console means which suppliers are MSME?

you can use frappe.log_error for debugging and you can check this log using frappe interface