简体   繁体   English

Oracle Apex刷新图表不起作用

[英]Oracle Apex Refreshing Chart is not working

I have created a dialog page in my apex application. 我已经在apex应用程序中创建了一个对话框页面。 On this page a user is possible to select several filters for a chart. 在此页面上,用户可以为图表选择几个过滤器。 After clicking on a button the user is redirected to the previous page and the region which contains the chart is refreshed. 单击按钮后,用户将重定向到上一页,并且刷新包含图表的区域。 The problem I have is that setting the filters doesn't work. 我的问题是设置过滤器不起作用。 After being redirected to the previous page the chart is being refreshed endless until an error occurs that says: Bad Gateway. 重定向到上一页后,图表将无休止地刷新,直到出现错误:错误的网关。 So I don't see any result of the chart. 因此,我看不到图表的任何结果。 Is it possible that the query of my chart is too complex? 我的图表查询是否可能太复杂? The dialog page contains four items of type shuttle and here is the query of my chart. 对话框页面包含穿梭类型的四项,这是我的图表的查询。

select COUNT(TRIGGER_TABLE.DATUM_UHRZEIT) as Anzahl_Trigger,
   TEST.ID as ID
from BRIDGE_SYSTEM_TRIGGER, SYSTEM_TABLE, TRIGGER_TABLE, FAHRT, TEST, MITARBEITER
where BRIDGE_SYSTEM_TRIGGER.SYSTEM_TABLE_SYSTEM_ID = SYSTEM_TABLE.SYSTEM_ID
      and BRIDGE_SYSTEM_TRIGGER.TRIGGER_TABLE_TRIGGER_ID = TRIGGER_TABLE.TRIGGER_ID
      and TRIGGER_TABLE.FAHRT_FAHRT_ID = FAHRT.FAHRT_ID
      and MITARBEITER.QNUMMER = FAHRT.MITARBEITER_QNUMMER
      and FAHRT.TEST_ID = TEST_ID
      and TRIGGER_TABLE.PRIORITAET = 0
      or ((instr(':' || upper(:P26_Tests) || ':', upper(Test.Test_ID)) > 0)
      or (instr(':' || upper(:P26_UEBERSYSTEM) || ':',':' || upper(system_table.system_name) ||':') > 0) or (instr(':' || upper(:P26_UNTERSYSTEM) || ':',':' || upper(system_table.system_name) ||':') > 0)
      or (instr(':' || upper(:P26_COUNTRIES) || ':', upper(FAHRT.LAND)) > 0)
      or (instr(':' || upper(:P26_REF) || ':', upper(Test.REF)) > 0)
      or (instr(':' || upper(:P26_DRIVER) || ':', upper(MITARBEITER.QNUMMER)) > 0))
GROUP BY TEST.ID
ORDER BY TEST_ID;

The query doesn't throw any errors. 该查询不会引发任何错误。 Another problem I thought about is that something with the refresh is not correctly defined or not working. 我考虑过的另一个问题是刷新定义不正确或无法正常工作。

I could solve my problem! 我可以解决我的问题! There was no mistake in the refresh. 刷新没有错。 Although I could not proove why the refresh was not loading, I think it was a runtime-issue because the query was too complex. 尽管我无法证明为什么不加载刷新,但是我认为这是运行时问题,因为查询太复杂了。

I changed the last five or-conditions of my query to and-clauses . 我将查询的最后五个or条件更改为and子句 After doing that the refresh works again. 这样做之后,刷新将再次起作用。

select COUNT(TRIGGER_TABLE.DATUM_UHRZEIT) as Anzahl_Trigger,
TEST.ID as ID
from BRIDGE_SYSTEM_TRIGGER, SYSTEM_TABLE, TRIGGER_TABLE, FAHRT, TEST, MITARBEITER
where BRIDGE_SYSTEM_TRIGGER.SYSTEM_TABLE_SYSTEM_ID = SYSTEM_TABLE.SYSTEM_ID
      and BRIDGE_SYSTEM_TRIGGER.TRIGGER_TABLE_TRIGGER_ID = TRIGGER_TABLE.TRIGGER_ID
      and TRIGGER_TABLE.FAHRT_FAHRT_ID = FAHRT.FAHRT_ID
      and MITARBEITER.QNUMMER = FAHRT.MITARBEITER_QNUMMER
      and FAHRT.TEST_ID = TEST_ID
      and TRIGGER_TABLE.PRIORITAET = 0
      and ((instr(':' || upper(:P26_Tests) || ':', upper(Test.Test_ID)) > 0)
      and (instr(':' || upper(:P26_UEBERSYSTEM) || ':',':' || upper(system_table.system_name) ||':') > 0) or (instr(':' || upper(:P26_UNTERSYSTEM) || ':',':' || upper(system_table.system_name) ||':') > 0)
      and (instr(':' || upper(:P26_COUNTRIES) || ':', upper(FAHRT.LAND)) > 0)
      and (instr(':' || upper(:P26_REF) || ':', upper(Test.REF)) > 0)
      and (instr(':' || upper(:P26_DRIVER) || ':', upper(MITARBEITER.QNUMMER)) > 0))
GROUP BY TEST.ID
ORDER BY TEST_ID;

The query has definetely to look like that because I want to filter and that's why I need the and-condition. 该查询具有明确的外观,因为我想过滤,这就是为什么我需要and条件的原因。 Each element has to be true, otherwise wrong results will appear. 每个元素必须为true,否则将出现错误结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM