Hi Community,
I have a query which has multiple tables and multiples columns. This query is being used as an Interactive report query. When I run the application and click on the Link i am redirecting it to another page and based on :PAGEITEM value respective query should and show me the output. But what is happening is the Interactive Report is defaulting to some columns so only those selective columns are only being populated.
Please NOTE: I have 40 different tables and different columns
Code:
declare
l_sql clob;
begin
if :P4_SOURCE_TYPE = 'TABLE_NAME' then
l_sql := q'[
select COLUMN1, COLUMN2, COLUMN3, COLUMN4,
COLUMN5, COLUMN6, COLUMN7
from XXRET_OIC.TABLE_NAME
where COLUMN3= 'E'
and trunc(COLUMN6) between sysdate - 1 and sysdate
]';
elsif :P4_SOURCE_TYPE = 'XXFD_BR_PO_HEADER_IN' then
l_sql := q'[
select COLUMN1, COLUMN2, COLUMN3, COLUMN4,
COLUMN5, COLUMN6, COLUMN7
from XXRET\_OIC.TABLE\_NAME
where COLUMN3= 'E'
and trunc(COLUMN6) between sysdate - 1 and sysdate
\]';………………
Like this i have over 40 tables. i have seen the :P4_SOURCE_TYPE value is correct but still the the coorect code is not being execute and also the interactive report is deaulting few columns.
How can we solve for this ?
@steve-muench-oracle , @inol @everyone.
Also Tried
We have tried using Generic Column Toggle ‘Use generic columns’ we turned it on everything was working as expected but the column heading was showing up as COL1 COl2…COL3 which I don't want, i want individual column names for each table.