【问题标题】:Oracle Apex 5.1 (How to add custom link additional to default link on Interactive report)Oracle Apex 5.1(如何在交互式报告的默认链接之外添加自定义链接)
【发布时间】:2019-08-15 12:24:24
【问题描述】:

如何在 Oracle Apex 5.1 的交互式报告中添加额外的自定义链接到模态对话页面

我只想在特定行的标志为 Y 时显示此链接。

最好的方法是什么......

【问题讨论】:

    标签: oracle oracle-apex oracle-apex-5.1


    【解决方案1】:

    在报告中创建一个链接(使用f?p 语法)作为列。由于您只想在满足某些条件时显示它,请使用CASE(或DECODE),例如

    select 
      id,
      name,
      --
      case when flag = 'Y' then 'f?p=&APP_ID.:3:'||&SESSION.||'::NO::P3_POG:4005 
           else null
      end as link,
      --
      etc.
    from your_table
    where ...
    

    在本例中,我正在调用第 3 页并将 4005 传递给 P3_POG 项目值。

    更好的选择(正如 Jeffrey 建议的那样)是

    case when flag = 'Y' then 
              apex_page.get_url(p_page=>3, p_items=>'P3_POG', p_values=>my_id) 
    end as link
    

    不要忘记为 LINK 列设置转义特殊字符属性。

    【讨论】:

    • 我建议使用 APEX API 来生成链接,例如case when flag = 'Y' then apex_page.get_url(p_page=>3, p_items=>'P3_POG', p_values=>my_id) end as link
    • 您好,谢谢...我使用了 APEX_UTIL.PREPARE_URL。太棒了!
    • 不客气(我想@Jeffrey 也很高兴 :))。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    • 2015-04-02
    • 1970-01-01
    • 1970-01-01
    • 2011-11-11
    相关资源
    最近更新 更多