Hello. I'm using Apex 24.2.0 on a 21C database. I recently ran into a problem when my attendance tracking report stopped displaying beyond 18 columns. The columns are labeled with the meeting date. The number of meeting dates increases monthly. I use the Pivot clause in this report
It was originally in a Classic Report. I read that the Classic report can not go beyond 16 columns so I created a new page. In that page I added an Interactive Report. The Source / Location is “Local Database”. The Source / Type is “Function Body returning SQL Query” The Source / Language is "PL/SQL".
I continue to get a similar result with the new Interactive Report whereby the report header shows the newer dates, but the body doesn't show them. The PL/SQL is below:
--Attendance Report Original
declare
l_pivot_cols varchar2(4000);
l_sql clob := q'{
select
*
from
(select
vc.last_name || ', ' || vc.first_name as Attendee
, va.attendance_type
, ve.event_date
from
vol_attendance va
inner join vol_event ve
on va.event_fkey = ve.prim_key
inner join vol_contact vc
on va.contact_fkey = vc.prim_key
inner join vol_contact_group vcg
on vc.prim_key = vcg.contact_fkey
inner join vol_group vg
on vcg.group_fkey = vg.prim_key
where
vg.group_name = 'Aid'
and vc.status = 'Active'
and va.attendance_type is not null
)
pivot (
max(attendance_type) for event_date in (%s))
order by
attendee
}';
begin
select
listagg(apex_string.format('date ''%0'' "%0"', to_char(event_date, 'YYYY-MM-DD')), ', ')
within group (order by event_date)
into
l_pivot_cols
from
vol_event;
return apex_string.format(l_sql, l_pivot_cols);
end;
How do I get a larger number of columns to display on the report?
Thanks for looking at this?