I cannot think of a sample of which achieve the exact requirement you have.
However, please refer to SAP Note: 1447169 - How to add a report filter to a Web Intelligence document using the Report Engine Java SDK , which can give you a better idea about how to create filters in a webi report using Report Engine SDKs.
You would need to have the developers guide and API referrence to understand the Report Engine SDKs better.
It would be best if you ask your firewall team to raise an exception for this download, as the list of jars, The API being used and the interfaces being used in above sample code is mentioned in the guides.
Thanks,
Prithvi