我需要知道如何通过单击树节点在树的同一页面上过滤报表(经典/交互式)。 可在此站点上找到此示例:
http://apex.oracle.com/pls/apex/f?p=36648:34:1599336964673301::NO :::
我已经尝试过这个查询来编写我的树:
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"NAME" as title,
null as icon,
"ID" as value,
null as tooltip,
decode(level, 1, 'f?p=&APP_ID.:106:'||:APP_SESSION||'::::P106_MAQ_ID:'||ID,
2, 'f?p=&APP_ID.:106:'||:APP_SESSION||'::::::::P106_MAQ_ID:'||(ID-1000),
3, 'f?p=&APP_ID.:104:'||:APP_SESSION||'::::P106_MAQ_ID:'||(ID-10000),
4, 'f?p=&APP_ID.:105:'||:APP_SESSION||'::::P106_MAQ_ID:'||(ID-100000)
) as link
from "#OWNER#"."V_TREE1"
start with "PID" is null
connect by prior "ID" = "PID"
order siblings by "NAME"
但传递的参数不会更改报告传递ID的行。我需要获得上面发布的网站上显示的相同结果。
我在重定向到另一个页面的操作上获得了成功,该页面是一个表单,可以通过报表进行编辑,但不能显示。我想在同一页面上显示。
以下是我用来重定向的查询:
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"NAME" as title,
null as icon,
"ID" as value,
null as tooltip,
decode(level, 1, 'f?p=&APP_ID.:102:'||:APP_SESSION||'::::P102_MAQ_ID:'||ID,
2, 'f?p=&APP_ID.:103:'||:APP_SESSION||'::::P103_SRV_ID:'||(ID-1000),
3, 'f?p=&APP_ID.:104:'||:APP_SESSION||'::::P104_INS_ID:'||(ID-10000),
4, 'f?p=&APP_ID.:105:'||:APP_SESSION||'::::P105_SIS_ID:'||(ID-100000)
) as link
from "#OWNER#"."V_TREE1"
start with "PID" is null
connect by prior "ID" = "PID"
order siblings by "NAME"
非常感谢你的帮助。
答案 0 :(得分:0)
很可能您没有更改报告查询。假设您的树/报告页面为106,并且您希望将结果过滤到P106_MAQ_ID
。
您需要在where子句中包含它:
SELECT ...
FROM ...
WHERE MAQ_ID = :P106_MAQ_ID;
您发布的查询中也有错误。对于有效的顶点网址(2, 'f?p=&APP_ID.:106:'||:APP_SESSION||'::::::::P106_MAQ_ID:'||(ID-1000),)