在Oracle Apex Interactive Report中保存分页 [英] Saving pagination in Oracle Apex Interactive Report

查看:84
本文介绍了在Oracle Apex Interactive Report中保存分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在Oracle Apex 4.2.0003中遇到了一个问题,即在Interactive Report中保存了分页.我有一个页面,其中有两个报告:第一个是Classic,第二个是Interactive,因为它们起着主从细节"的作用.
此外,交互式报表既包含视图数据,又包含HTML元素(如带有链接到模式窗口或弹出窗口的图标).该页面中的所有内容均正常运行,但有一件事情:刷新会导致重置详细信息"交互式报表的分页,即使是完全刷新或部分刷新(不重置Classic,"master"也是如此).

Recently I've come across the problem in Oracle Apex 4.2.0003 with saving pagination in Interactive Report. I have a page, in which there are two reports: the first one is Classic, and the second one is Interactive, at that they are working as "master-detail".
Besides, Interactive report has both data from a view and HTML-elements like icons with links to modal or pop-up windows. All in the page works fine except one thing: refreshing of it leads to resetting the pagination of "detail" Interactive report in spite of full refresh or partial (without resetting the Classic, "master" one).

我试图用javascript解决问题:我编写了一些代码,该代码从页面上获取当前的分页并在更新之前将其保存,并且更新本身通过功能gReport.navigate.paginate进行.我可以使用这种方式,但没有考虑行数少于在交互式报表"面板中选择的行数(还有搜索栏等)的情况.
解决方案我正在考虑的另一种解决方法是从视图APEX_APPLICATION_PAGE_IR_RPT获取有关每页当前行数的信息,但是我不知道如何从列interactive_report_id而不是信息中获取信息. report_id.

I've tried to solve the problem with javascript: I've written some code, which got current pagination from page and saved it just before updating, and the updating itself went by means of function gReport.navigate.paginate. I could use this way, but it didn't take into account the cases when there were less rows than the count of them chosen in the Interactive Report panel (where also there are search bar etc.).
Another way of solving my problem I'm considering now is getting information about current row count per page from the view APEX_APPLICATION_PAGE_IR_RPT, but I don't know how to get not information from the column interactive_report_id, but from the one named report_id.

当然,我可以通过获取会话ID和视图类型(可以在Interactive Report面板中自定义)来获取信息,但我不能说我喜欢它.

Of course, I have the way which leads through getting information by having session ID and the kind of view (which can be customized in Interactive Report panel), but I can't say I like it.

所以我有以下问题:在我的情况下,如何使Interactive Report不重设分页?是否有可能比从APEX视图中获取信息更容易?

So I have the following question: how to make Interactive Report NOT to reset pagination in my case? Is it possible to make it easier than to get the information from APEX views?

推荐答案

这是一个时不时弹出的问题,在apex 5中仍然是一个问题,因为甚至没有支持的方法尽管它所需要的只是稍微开放了api,所以我们不需要对其进行破解.
您可以肯定使用gReport.navigate.paginate,我建议您使用它.请注意:Oracle不支持它(如未记录),并且在apex 5中不起作用(IR的JS已重做).但是,即使在顶点5中,方法仍然相似:只是破解"它.

This is a question which pops up from time to time and this is still an issue in apex 5, being that there is no supported way to do this, even though all it requires is opening up the api a bit so we wouldn't need to hack it.
You can use gReport.navigate.paginate for sure, and I'd recommend to go with that. Mind though: it's unsupported by Oracle (as in: undocumented) and it does not work in apex 5 (the JS for IRs has been redone). However, even in apex 5 the methodology remains similar: just "hack" it.

我不会查询视图.您仍然需要报告中的ID并与后端进行通信,并且您将产生比实际需要更多的问题.

I would NOT query views. You still need IDs from the report and communicate with the backend, and you'll create many more problems than you actually need.

只要有分页,只要用JavaScript找出即可.

Just figure out in javascript when there is pagination or not.

每页中的行数超过允许的行数时,IR中的HTML:

HTML in the IR when there are more rows than the allowed rows per page:

<td colspan="18" class="pagination" align="left">
  <span class="fielddata"> 1 - 15 of 1878 
    <a href="javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')">
      <img src="/i/jtfunexe.gif" title="Next" alt="Next" align="absmiddle">
    </a>
  </span>
</td>

HTML,如果行数少于或等于允许的数量:

HTML when there are less or equal rows than amount allowed:

<td colspan="18" class="pagination" align="left"><span class="fielddata"> 1 - 1 of 1 </span></td>

因此:您可以检查其中是否有定位标记.
如果是,请执行分页"功能.
如果没有,请刷新.

So: you can check if there is an anchortag in there or not.
If yes: perform your 'paginate' function.
If not: do a refresh.

这篇关于在Oracle Apex Interactive Report中保存分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆