Tuesday, July 21, 2009

In case Apex report partial page refresh (PPR) won't work

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Every day is a good day for learning something new.
For instance yesterday i learned that there are two distinct ways of enabling partial page refresh for reports in Oracle Application Express. The second thing i learned is that one method excludes the other one...

Just to clarify the matter, partial page refresh aka PPR is the Apex feature that allows a user to refresh only the portion of page containing the report whenever a pagination or column sort link is clicked. This effect is achieved by means of built-in AJAX code.

The old, traditional way was to specify the built-in report template called "Standard (PPR)" (or a user-modified copy thereof) which included the necessary javascript calls inside the template source code.
As of version 3.1 a new declarative setting was added to the report attributes, a flag called "Enable partial page refresh". This new attribute MUST NOT BE used together with the PPR template. The picture below shows an INCORRECT setting:

If you mix up PPR template and PPR flag, you'll get a report where pagination links do not work at all.
If you are using Firefox with Firebug installed, you should be able to spot this problem quickly:

I prepared a sample page on apex.oracle.com where you can see the old and the new method on the same page, as well as the third wrong method that "breaks" report pagination.

So, if your PPR report doesn't work, you might want to check out if you inadvertently turned on the PPR flag against an old PPR template.

Given the increased flexibility allowed by the declarative approach, which allows you to pick any report template of your liking, probably it's time to migrate the old reports based on the PPR report template:

See more articles about Oracle Application Express or download tools and utilities.


Yann said...

Thanks, it helped me :)

Anonymous said...

Thank you very much!!! We spent quite a few hours trying to figure out why our report would not refresh!

Anonymous said...

Thanks a lot!! I was having hard time in debugging the paginations links on report which were not working because I had both PPR template and PPR flag enabled. This blog helped me in solving it :)

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles