Currently I have a browser screen with a Report button. It is using TablePrintFormAction so when the user clicks Report, he gets the Run Reports dialog, showing all the reports that have been added to that browser screen.
I would like to filter out some of the reports/options in the dialog based on the status (an attribute) of the selected entity. Because certain reports only make sense for a certain status. Does anyone have any advice?
I overrode openLookup method on the browse screen since the action calls it to invoke the report dialog. So in that method I strip out the reports from the parameter object that don’t belong based on the status of the selected data.
I wish AbstractPrintFormAction had some more hooks that I could have overridden instead but it’s not that flexible. Perhaps that would be a good enhancement in the future. Adding protected methods like getAvailableReports would help.