Hide columns According to filter in Script Report

Hello all,

I created One script report in my custom app and added 5 filters. Among them when third filter select then I want to hide 2 columns from report.

In above Image when I filter from Third filter the I want to hide doctor and hospital columns.

How can I do that? anyone Can help me??

I guess that something like this will help you.

Note: change to your fields and properties

def get_columns(filters):
columns = [
_ (“Posting Date”) + “:date:90”,
_ (“Remarks”) + “::200”,
_ (“Against Account”) + “::200”,
_ (“Amount”) + “:Float:100”,
]
if filters.get (“show_in_account_currency”):
columns += [
_ (“Debit”) + " (" + filters.account_currency + “)” + “:Float:100”,
_ (“Credit”) + " (" + filters.account_currency + “)” + “:Float:100”
]
columns += [
_(“Voucher Type”) + “::120”,
(“Voucher No”) + “:Dynamic Link/”+(“Voucher Type”)+“:160”,
]
return columns