简体   繁体   中英

how acess the report column value in oracle-apex?

I need the "elabora prenotazione" button to be shown only when the column "stato prenotazione" is "IN SOSPESO" I tried to set a condition but I don't know how to pick the column value

在此处输入图片说明

If I understand your question, this could help:

For the source of your report:

SELECT
    CASE
        WHEN stato_prenotazione = 'in sospeso' THEN 'elabora prenotazione'
        ELSE ''
    END name_of_column,
prenotazione,
username,
nome,
cognome,
viaggio,
stato_viaggio,
data_prenota,
stato_prenotazione,
numero_ospiti
FROM your_table

Then set the column "name_of_column" to type: link, and fill the target.

Wrap a condition around a call to apex_page.get_url within your SQL, so it will only produce a link when relevant

Example of function in use, sans condition: https://azureoutput.wordpress.com/2017/10/18/custom-hyperlink-in-interactive-report/

Use this to make the button look prettier, and maybe get some other ideas https://www.grassroots-oracle.com/2015/12/tutorial-include-action-button-in-report.html

See this in regard to escaping special characters, otherwise you'll just see HTML in your report https://www.grassroots-oracle.com/2017/01/escape-special-characters-apex-demo.html

This could be resolved by a simple case statement as @sara mentioned. something like:

select (case stato_prenotazione when 'in sospeso' then 'elabora prenotazione' end) as your_column

I would not keep else condition so that the column will simply contain null value if the condition is not met.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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