the Classic Report seems to be more flexible as it has attributes Use Generic Column Names and Generic Column Count and then it's possible to also dynamically define column Headings in report Attributes => Heading, Type PL/SQL Function Body that is supposed to return colon-delimited heading names.
I assume that if such option was implemented also for IR, APEX devs would do it consistently and we could find such attributes at expected places.
So I believe that it's not possible (and I may be wrong) that the only one option how to make dynamic column headings is to create page items for each column and then use the standard &PX_ITEM. substitution. As item substitutions are evaluated only on page-load, this method won't work for report refresh DAs.
With APEX 18.1 there is a new option within your interactive report, one of them is: PL / SQL Function Body return SQL Query.
With this function you can create interactive dynamic reports.
Requesting clarification from joelkallman-Oracle:
- Is this intentional? If so why is it not documented?
- What happened to the oft-repeated position that "basing an IR on a PL/SQL Function is not feasible"?
The problem is that the select can not be modified dynamically.
My apologies for the delay. It was a busy week at the Kscope18 conference. I confirmed this with Patrick Wolf-Oracle while at the conference.
- It applies to more than just Interactive Reports. The source can be dynamic for many region types now, including Interactive Reports. That's my feeble explanation for why it's not documented in the "what's new" for Interactive Reports.
- As Patrick also confirmed, the "shape" of a dynamic query for Interactive Reports shouldn't change (that is, the SELECT clause should remain constant). This is because of the way that additional definition metadata is saved for both the definition and saved reports of Interactive Reports.
If you want "dynamic everything", then Classic Reports remains the preferred way to go. And as Carsten Czarski-Oracle wrote in this blog post, the styling options for Classic Reports is pretty amazing.
I hope this helps.