0
votes

I'm having trouble making a button inside a Classic report. It's quite simple, I have a Classic Report and inside it there is a Select-list and a Button, follow the code below.

select a.COD_TAG_ITEM  
 , a.NOM_ITEM,a.CLIENTE  
 , a.SIG_UNI_MEDIDA  
 , a.nro_pedido  
 , a.NRO_ITEM  
 , sum(a.QTD_VENDIDA)  
 , apex_item.select_list(  
        p_idx           => 1,  
        p_list_values   => 'Programado;1,Executando;2,Encerrado;3',  
        p_show_null     => 'YES',  
        p_null_value    =>  0,  
        p_null_text     => 'Selecione',  
        p_attributes    => 'style="color:red;"',  
        p_show_extra    => 'NO') as SITUACAO --SELECT!  
 , 3 ALTERAR  
from v_pedido_venda a  
where a.NRO_EMPRESA = 1  
and a.NRO_FILIAL = 3  
and a.DAT_OCORRENCIA = trunc(sysdate)  
and a.nro_item = :P3_ITEM  
group by a.COD_TAG_ITEM,a.NOM_ITEM, a.SIG_UNI_MEDIDA,a.CLIENTE, a.nro_pedido, a.NRO_ITEM   
order by 2,1,3

I would like that by pressing the ALTERAR button, it picks up the value that was selected in the Select-list and executes a javascript or a Dynamic Action, where an Update will be done in the database by changing the value of the table with that Select- List I've also tried pressing the button, throwing that Select-list value into an input, but it returns all options, not just the one selected.

Example image of my project:

enter image description here

1
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.halfer

1 Answers

0
votes

I'm not sure that will work because the page item has to be set in the session before your process can pickup the chosen value..

Seems a bit weird (to me) that you're trying to alter data based on a Classic Report, not a form or an IG...

Have you thought to fire an Ajax call to get it from the browser and process it in the server and bypassing the session state..

The idea is good! I like it.. I'm also interested in how will you make it work...