Hello Fellow bloggers,

With APEX 5.2 you get a lot of new options within your classic report one of them is : PL/SQL Function Body returning SQL Query.
With that function it’s easier than ever before to create dynamic classic reports.

Let me show you how.

Create a table where you store your query you want to use in your Classic report.

create table TEST_QUERYS
( id number(10) NOT NULL
, query varchar2(4000) NOT NULL
insert into TEST_QUERYS
,'select * from emp'

In your Classic Report Select :
Source Type = PL/SQL Function Body returning SQL Query

lv_query varchar2(4000);

select query
into lv_query
where id = 1(You can use Bind variables here.);

return lv_query ;

And there you have it.(DEMO)

Categories: Oracle APEX

Leave a Reply

Your email address will not be published. Required fields are marked *