Just created a new feature request for APEX at https://apex.oracle.com/pls/apex/f?p=55447:19:::NO:19:P19_ID:50481528500531591330407043519019274105 … Extend Interactive Report API - Get IR Query. The feature request is abut the following:
"This API should deliver a couple of different SQL statements for an interactive report. There are several possible requirements I can think of:
1. IR query including visible columns and filter values - actual SQL for the user session,
2. IR query including all columns and the original SQL,
3. get column names of an IR with or without column alias,...
Having this SQL we should be able to run it as EXECUTE IMMEDIATE, without having to replace any binds.
This feature could be included in the actions menu and available as a plugin for dynamic actions - new dynamic action feature (action)."
Please, feel free to go there and vote for it.