Reputation: 49
I have created a dialog page in my apex application. 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.
Upvotes: 0
Views: 579
Reputation: 49
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. 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. Each element has to be true, otherwise wrong results will appear.
Upvotes: 1