ReportGrid works with dataset as data source. And data set can be OQL or java action.
OQL can take a Parameter
https://docs.mendix.com/refguide/oql-parameters
https://docs.mendix.com/refguide/data-sets#4-parameters
https://docs.mendix.com/refguide/report-widgets
When you have ReportGrid you can add a Report parameter matching the OQL parameter on the page where you add your reportgrid