APEX-PLUGIN.COM

..the apex plugin directory

an initiative of

Add your APEX4.0 Plugin info

Describe your Plugin’s features. You can upload the Plugin’s code and documentation, or, alternatively, submit the URLs to your Website, GitHup Repository or Blog.

You are here:
Follow us on Twitter
Dynamic Action Plugin Refresh reports w/ pagination

Refresh reports w/ pagination

9
Categories: Dynamic Action Plugin
Author: Ana Miloš

Refresh classic and IR, and keep pagination

(This is the version for APEX 4.*; you can find the version for APEX 5.* here: http://apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/refresh-reports-w%10-pagination_420.html  )  

 

 Info 

 When you want to refresh your Report (interactive or classic), but don't want to submit the entire page, you typically use Dynamic Action > Refresh.

This works fine, but it resets the pagination of the report and you end up back on page one after each refresh.
This can be quite annoying for a variety of reasons so I ended up creating a simple plugin which refreshes both interactive and classic report, but at the same time doesn't reset the pagination.

This works for classic and interactive reports.

 

How do you use it?

Instead of using "Refresh" in your Dynamic Action, after you install the plugin all you have to do is to select Refresh report and keep pagination [Plug-in] as your true action and then select the affected region. And that's it!

 

Questions/comments/bugs

If you have any questions, post a comment below or send me an email and I'll try to respond as soon as possible. 

 

Update

Classic report regions wouldn't refresh if the report had no rows at first and you just inserted the first row. This has now been fixed. Thanks to Ali Y for pointing out the bug.

 

Update2

Reports with static IDs wouldn't refresh. This has now been fixed.


Keywords
Interactive Report, classic report, refresh, pagination

Oracle APEX Plugin
Company:
Date added: 20.12.2013
Views: 18844
Votes: 3
Reviews: 6
Min. APEX Version:
4.0
Share on Facebook
Digg! Share on Digg
Save This Page
Link to:
Download
download apex plugin
If something is not correct please report it here: Report Listing
Do you have a question about this Plugin? Want to write a Review or Comment?
Login first.
Reviews / Questions / Comments are e-mailed to the author of the Plug-in.
0 
by Ana Miloš
on July 27, 2015
Added new version for APEX 5. Link in description.
July 27, 2015
The Entry has been updated in the meantime!
0 
To refresh record set and if empty
by Alex
on August 31, 2014
1) Find regions internal id (for "DEPARTMENTS" region static ID) :

select region_id
from APEX_APPLICATION_PAGE_REGIONS
where application_id =:APP_ID
and static_id='DEPARTMENTS'

Let say, it is 123456.

2) Javascript that refreshes current record set (replace "max:4,fetched:0" with your sizes):

var current_set = $("#DEPARTMENTS .uReportPagination .pagination span.fielddata").text().trim();
var first_record = current_set.substr(0,current_set.indexOf(' '));
apex.widget.report.paginate(123456,{min:first_record,max:4,fetched:0});

3) Handle empty record set in region's "After Refresh" by condition:

$("#XXDL_DEPARTMENTS .apex-tabular-form-error-box").size() > 0

to just refresh the region.

Example at
https://apex.oracle.com/pls/apex/f?p=ALL_IN_1:ONE_PAGE:0
works when 2nd record set becomes blank (departments or employees / delete or transfer).
0 
by Ana Miloš
on August 27, 2014
Hi Dave, thank you for taking the time to describe the bug in such detail. I first learned about this a couple of days ago and I will do my best to correct this behaviour in the next week or so.
8 
Bug Refresh reports w/ pagination
by Dave
on August 27, 2014
Hi,

Thanks for taking the effort to making this plugin, it saved me a lot of work figuring this one out myself.

I did however find a problem when you use the plugin after the number of rows changed, (in my case by using a delete) and the current page has no more records to show. (Apex will give you a warning (where the report should be), and give you the option to reset the pagination. ("Invalid set of rows requested, the source data of the report has been modified.")

I had this when using the plugin for a classic report, but I'm pretty sure you will have the same result in an interactive report.
0 
by Ana Miloš
on April 23, 2014
Hi, Scott,

maybe you could override the default apex refresh, and use the javascript code from the plugin instead.
If you are able to override the refresh, I'll be happy to rewrite the code for you, sometime next week.
Let me know at ana.milos.hr@gmail.com.
0 
refresh from JavaScript API
by Scott
on April 23, 2014
Do you think there might be a way to integrate your plugin to fire in response to the following command?

$('#my_report').trigger('apexrefresh');
Powered by Sigsiu.NET RSS Feeds

Disclaimer: The APEX Plugins on this site are not supported by Oracle Support Services.

If you have a question about a Plugin or need support: Login and select the plugin detail page. At the bottom you can enter your Question / Review / Remark.
Your message will be sent to the author of the plugin.