You can report within a report about multiple reporting dates. With this, for example, you can use project versions. The following example prints a statistic for a number of reporting dates.
declare
l pls_integer;
begin
--
-- Logon.
--
bubs_session.set_session_info('bubs_install.sql', 'install', 'system', 'various', sys_Filter('userenv', 'ip_address'), sys_Filter('userenv', 'host'), 'n/a', '$Header: http://svn.invantive.com/repos/p104/trunk/help/nl/manual/Topics/rap-bouwen-meerdere-rapportage-perioden-in-een-rapport.xml 19891 2012-10-09 13:23:03Z gle3 $');
--
-- For all project versions matching the filter plus the current time, we
-- will print an overview of a statistic.
--
for r in
( select pjt_code
, pve_code
, pve_datum_rapportage
from bubs_project_versies_v
where 1=1
and pve_datum_rapportage <= sysdate
and regexp_instr(pve_code, coalesce(cig_patroon_project_versies, '^') ) > 0
union all
select distinct pjt_code
, bubs#vertalingen.translate_keys('{res:bubs_now}')
, null
from bubs_project_versies_v
order
by pjt_code
, pve_datum_rapportage
)
loop
--
-- Travel to the right moment in time.
--
bubs_session.set_point_in_time(r.pve_datum_rapportage);
--
-- Determine the statistics. Simple example.
--
select count(*) cnt
into l
from bubspopbrengst_soorten_v
;
--
-- Print results.
--
dbms_output.put_line(r.pjt_code || ', ' || rpad(r.pve_code, 30) || ', ' || rpad(to_char(r.pve_datum_rapportage, 'yyyymmddhh24miss'), 14) || ' = ' || l);
end loop;
end;