Code to set filters for a report and then save the report as a pdf in NAV 2016

Hello!  I need to set the filters of a report in code and then save it as a pdf. I am using NAV 2016.  Any help would be greatly appreciated!