Report with checkbox problem

I have a process that approves activities by clicking on the checkbox of my report. This is my first column called htmldb_application.g_f01. When I try to approve activities and I try to return the value of htmldb_application.g_f11(i), it always stays on the first value. Here is my code :
Declare
--Niveau_Approb number;
Retard number;
Date_Prevue_Active date;
Approbation1 number;
Delegue2 number;
Approbateur2 number;
Approb2 number;
l_count number;
Usager_Approb2 number;
Niveau number;
Begin
for i in 1..htmldb_application.g_f01.count
loop
select count(*)
into Usager_Approb2
from Approbateur, tache, activite
where activite.code_activite        = htmldb_application.g_f01(i)
And   activite.code_tache           = tache.code_tache
And   tache.code_tache              = approbateur.code_tache
and   approbateur.niveau_approbation = 2
and   approbateur.pein               = :USAGER_ACTIF
and   code_activite not in
         select code_activite
         from Delegation, tache, activite
         where activite.code_activite        = htmldb_application.g_f01(i)
         And   activite.code_tache           = tache.code_tache
         And   tache.code_tache              = delegation.code_tache
         and   to_date(activite.date_prevue, 'YYYY-MM-DD')
         between to_date(delegation.date_debut, 'YYY-MM-DD') and to_date(delegation.date_fin, 'YYYY-MM-DD')
         and   delegation.niveau_approbation = 2
         and   delegation.pein = :USAGER_ACTIF);
select count(*)
into Approbation1
from approbation
where code_activite      = htmldb_application.g_f01(i)
and   niveau_approbation = 1;
into Delegue2
from Delegation, tache, activite
where activite.code_activite        = htmldb_application.g_f01(i)
And   activite.code_tache           = tache.code_tache
And   tache.code_tache              = delegation.code_tache
and   delegation.niveau_approbation = 2;
select count(*)
into Approbateur2
from Approbateur, tache, activite
where activite.code_activite         = htmldb_application.g_f01(i)
And   activite.code_tache            = tache.code_tache
And   tache.code_tache               = approbateur.code_tache
and   approbateur.niveau_approbation = 2;
Niveau :=htmldb_application.g_f11(i);
    RAISE_application_error(-20000,Niveau,TRUE);
IF (htmldb_application.g_f11(i)=2) And (Approbation1 <= 0)
THEN
    RAISE_application_error(-20000,'  An approbation from level 1 needs to be done before you approve level 2./ Une approbation de niveau 1 doit avoir été effectuée pour que vous puissiez approuver avec un niveau 2.',TRUE);
elsif (htmldb_application.g_f11(i)=1) and (usager_approb2 >= 1)
then
     RAISE_application_error(-20000,'You already have to approve level 2 so you can not approve level 1/ Vous devez déjà approuver un niveau 2 alors vous ne pouvez approuver un niveau 1.',TRUE);
ELSE
   Insert into Approbation (PEIN, CODE_ACTIVITE, DATE_APPROBATION, DATE_CREATION, PEIN_CREATION,
   NIVEAU_APPROBATION, PEIN_REVISION, DATE_REVISION)
   Values (:USAGER_ACTIF, htmldb_application.g_f01(i),sysdate, sysdate,
   :USAGER_ACTIF,htmldb_application.g_f11(i), :USAGER_ACTIF, sysdate);
   commit;
   Select NBJRS_RETARD into Retard from tache, activite where activite.code_activite =   
   htmldb_application.g_f01(i) and activite.code_tache = tache.code_tache;
   Select date_prevue into Date_Prevue_Active from activite where activite.code_activite =  
   htmldb_application.g_f01(i);
   if (trunc(sysdate) > trunc(Date_Prevue_Active)+Retard)
   then
      if (htmldb_application.g_f11(i)= 1 ) And (Delegue2 <=0) And (
          Approbateur2 <= 0)
      then
         Update activite set succes = 'T', STATUT_QUALITE = 'En Retard',DATE_REVISION = sysdate,
         pein_revision = :USAGER_ACTIF
         where code_activite = htmldb_application.g_f01(i);
      elsif (htmldb_application.g_f11(i) = 1) And ((Delegue2 > 0) OR (
             Approbateur2 > 0))
      then
          Update activite set succes = 'C', STATUT_QUALITE = '2',
          DATE_REVISION = sysdate,
          pein_revision = :USAGER_ACTIF
          where code_activite = htmldb_application.g_f01(i);
       elsif (htmldb_application.g_f11(i) = 2) and (Approbation1 > 0)
       then
            Update activite set succes = 'T', STATUT_QUALITE = 'En Retard',
            DATE_REVISION = sysdate,
            pein_revision = :USAGER_ACTIF
            where code_activite = htmldb_application.g_f01(i);
       end if;
   else
     if (htmldb_application.g_f11(i)= 1 ) And (Delegue2 <=0) And ( Approbateur2 <= 0)
     then
             Update activite set succes = 'T', STATUT_QUALITE = 'À Temps',
             DATE_REVISION = sysdate,
             pein_revision = :USAGER_ACTIF
             where code_activite = htmldb_application.g_f01(i);
     elsif (htmldb_application.g_f11(i) = 1) And ((Delegue2 > 0) OR ( Approbateur2 > 0))
     then
             Update activite set succes = 'C', STATUT_QUALITE = '2',DATE_REVISION = sysdate,
             pein_revision = :USAGER_ACTIF
             where code_activite = htmldb_application.g_f01(i);
     elsif (htmldb_application.g_f11(i)= 2) and (Approbation1 > 0)
     then
             Update activite set succes = 'T', STATUT_QUALITE = 'À Temps',
             DATE_REVISION = sysdate,
             pein_revision = :USAGER_ACTIF
             where code_activite = htmldb_application.g_f01(i) ;
     end if;
  end if;
Anyone can help me ??
Thanks
Chantale
   commit;
end if;
  --  RAISE_application_error(-20000,Niveau,TRUE);
end loop;
end;

Hi all,
I have the same problem with another report, here is part of my code :
DECLARE
q VARCHAR2 (30000);
tbl VARCHAR2 (30000);
w varchar2(500);
n varchar2(3);
BEGIN
q := ' select APEX_ITEM.CHECKBOX(14,rownum) id,x.Nom,' ||
'APEX_ITEM.SELECT_LIST_FROM_LOV(11,x.IdHoraire,''' ||
'LISTE DES HORAIRES DE TRAVAIL' || ''',null,''' || 'NO' || ''') as Horaire,' ||
'APEX_ITEM.CHECKBOX(12,x.TechAccredite,' ||
'decode(x.TechAccredite,null,null,' || '''CHECKED''' || ')) Accredite, ' ||
'APEX_ITEM.TEXT(13,x.Numero,10,10,' ||
'''onblur="javascript:if(!valider_telephone(1,this.value)){alert(''' ||
'''Numero non valide''' || '''); this.focus();};"''' || ') Tel, ' ||
'APEX_ITEM.HIDDEN(10,x.IdCT) as ICT';
q := q || ' from (';
tbl := ' a valide select statement';
q := q || tbl || ' ) x ';
w := ' where ';
w := w || ' x.IdDepot = decode(:P97_IDDEPOT,-1,x.IdDepot,:P97_IDDEPOT) ';
w := w || ' or x.IdDepot is null ';
w:= w || ' order by 2';
q := q || w;
RETURN q;
END;
and I created a process :
declare
res varchar2(100);
id number;
Begin
res := 'res';
for i in 1..APEX_APPLICATION.G_F14.count loop
id := to_number(APEX_APPLICATION.G_F14(i));
res := res || ' i=' || i || ' rownum ' || id || ' th ' ||
APEX_APPLICATION.G_F11(APEX_APPLICATION.G_F14(i));
end loop;
:P97_POUB := res;
End;
My process just print the 'res' in an item named P97_POUB, so I can see if evry thing works.
But I still have a no data found error.
Benn

Similar Messages

  • Report with checkboxes

    Hi all,
    I have a report with checkboxes getting the empno in return
    I have
    select apex_item.checkbox(1, empno) cbox,a.empno, a.ename,a.mgr,a.deptno from emp a
    in the report....
    I do have a dummy hidden field(P2_EMPNOS) which stores the empno's into it with comma concatenated(for which i wrote a page process)
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    :P2_EMPNOS := NULL;
    :P2_EMPNOS :=apex_application.g_f01(1);
    FOR i IN 2 .. apex_application.g_f01.COUNT
    LOOP
    :P2_EMPNUMS :=
    :P2_EMPNOS
    || ','
    || apex_application.g_f01(i);
    END LOOP;
    END;
    in my next page I want the records that I have selected like this
    select a.empno, a.ename,a.mgr,a.deptno
    from emp a
    where empno in :P2_EMPNOS
    I did tried (:P2_EMPNOS),':P2_EMPNOS'
    The problem is if I select one checkbox, then in the next page I'm getting that one record....
    but If I select multiple, then starts trouble...it says "no data found"...but still the values can be viewed in the next page with comma separated
    Can some body help me in this please.
    Thanks in advance.
    Gora

    Hello Varad,
    Thankyou for the quick response.
    The problem here is....my item is getting the selected values as a string(i guess ;) )
    i think we have to figure out how we could break it and send those as single values.
    Any more guesses please...
    Regards,
    Gora

  • Report with Checkbox

    I am trying to follow the example shown at the below link but it is not working. I am modifying some of the code since I am using version 1.6. Any ideas as to what I may be doing wrong. The checkbox appears and I can select and deselect items but I cannot get P6_HOLDER to hold any of the values of the selected items. Thanks!
    http://apex-smb.blogspot.com/2009/01/apex-report-with-checkboxes-advanced.html
    First I created a page item called P6_HOLDER.
    Next I created a report region (sequence 40) with the below code.
    select htmldb_item.checkbox (1, dev_obj_id, 'onchange="spCheckChange(this);"',
    :P6_HOLDER, ':') checkbox, dev_id, dev_obj_desc from edm_dev_obj where
    dev_id = :P6_TEMP_DEV_ID
    **I then created a html region (sequence 1) with the below code**
    <SCRIPT src="http://www.google.com/jsapi"></SCRIPT>
    <SCRIPT>
    // Load jQuery
    google.load("jquery", "1.2.6", {uncompressed:true});
    function spCheckChange(pThis){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=CHECKBOX_CHANGE',$v('pFlowStepId'));
    get.addParam('f01',pThis.value); //Value that was checked
    get.addParam('f02',pThis.checked ? 'Y':'N'); // Checked Flag
    gReturn = get.get();
    $f('checkListDisp').innerHTML=gReturn;
    </SCRIPT>
    CHECKBOX List:
    <DIV id=checkListDisp>&P6_HOLDER.</DIV>
    I then created an application process on Demand called CHECKBOX_CHANGE with the below code
    DECLARE
    v_item_val NUMBER := htmldb_application.g_f01;
    v_checked_flag VARCHAR2 (1) := htmldb_application.g_f02;
    BEGIN
    IF v_checked_flag = 'Y' THEN
    -- Add to the list
    IF :P6_HOLDER IS NULL THEN
    :P6_HOLDER := ':' || v_item_val || ':';
    ELSE
    :P6_HOLDER := :P6_HOLDER || v_item_val || ':';
    END IF;
    ELSE
    -- Remove from the list
    :P6_HOLDER := REPLACE (:P6_HOLDER, ':' || v_item_val || ':', ':');
    END IF;
    -- Just for testing
    HTP.p (:P6_HOLDER);
    END;

    Hi
    Create a page level validation (fucntion returning boolean) and write code similar to following
    DECLARE
    v_count NUMBER := 0;
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    IF APEX_APPLICATION.G_F01(i) IS NOT NULL THEN
    v_count := v_count + 1;
    END IF;
    END LOOP;
    IF v_count = 0 THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END;I take it your report query is similar to following
    select apex_item.checkbox(1,"PK_CLMN") Tick, col2, col3 FROM tbl_nameCheers,
    Hari

  • Issues with report with checkbox

    Hi friends,
    i have created a report with checkbox.
    the query is
    > select apex_item.checkbox(1,person_id,'unchecked') "select",
    person_id,
    AVAIL_SAL_CERTIFICATE,
    OCCURANCE,
    LAST_AVAILED_DATE,
    REASON,
    EFFECTIVE_START_DATE,
    EFFECTIVE_END_DATE
    from YY_SALARY_CERTIFICATEnow am having one button in my report region. suppose if i checked the particular row in report and clicked that button it should redirect to next page which is a form page it contains all the fields what report page had and it should display the value of corresponding report row which i checked.
    how i can achevie this?
    pls someone help me...

    <li>On Submit PLSQL
    DECLARE
      lc_colln_name VARCHAr2(100) := 'MY_COLLN';
    BEGIN
      APEX_COLLECTION.CREATE_COLLECTION(lc_colln_name);
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT --use the checkboxes array index used in query
    LOOP
       --Add each checked record id to collection
       APEX_COLLECTION.ADD_MEMBER
                p_collection_name => lc_colln_name
               ,p_c001 => APEX_APPLICATION.G_F01(i)  --Now c001 column of collection has this id
    END LOOP;
    END;<li>SQL Query of report in Page 2
    select person_id,
    AVAIL_SAL_CERTIFICATE,
    OCCURANCE,
    LAST_AVAILED_DATE,
    REASON,
    EFFECTIVE_START_DATE,
    EFFECTIVE_END_DATE
    from YY_SALARY_CERTIFICATE
             ,apex_collections AC
    where AC.collection_name = 'MY_COLLN' --use the name of the collection created previously
    AND    person_id = AC.c001

  • Creating TREE REPORT with CHECKBOX against each row

    Hi Friends,
    I need to create a <b>TREE REPORT with  CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
    thanks in advance for your valuable time and help.
    Regards
    srithan
    Message edited by me for easyness
            Reddy

    Hi
    Following code is to add checkboxes in ALV tree:
    FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
    CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
    relationship = cl_gui_column_tree=>relat_last_child ).
    ... §0.2 if information should be displayed at
    the hierarchy column set the carrid as text for this node
    text = p_ls_data-object.
    node->set_text( text ).
    ... §0.3 set the data for the nes node
    node->set_data_row( p_ls_data ).
    item = node->get_hierarchy_item( ).
    item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
    item->set_type( if_salv_c_item_type=>checkbox ).
    pl_carrid_key = node->get_key( )._
    CATCH cx_salv_msg.
    ENDFORM_._Following code is for handling checbox_change event
    PERFORM application_action_events.
    FORM application_action_events .
    data: lr_events type ref to cl_salv_events_tree.
    *data gr_events type ref to lcl_handle_events.
    lr_events = gr_tree->get_event( ).
    create object gr_events.
    set handler gr_events->check for lr_events.
    set handler gr_events->on_link_click for lr_events.
    set handler gr_events->on_before_user_command for lr_events.
    set handler gr_events->on_after_user_command for lr_events.
    set handler gr_events->on_keypress for lr_events.
    endform. " application_action_events----
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS:
    check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
    ENDCLASS. "lcl_handle_events DEFINITION
    CLASS lcl_handle_events IMPLEMENTATION
    §4.2 implement the events for handling the events of cl_salv_table
    CLASS lcl_handle_events IMPLEMENTATION_._
    METHOD check_._
    WRITE 'hello'_._
    DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
    node_key = node_key - 1_._
    READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
    if columnname = 'FCHECKBOX'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->fcheckbox =_ ' '_._
    ELSE_._
    lwa_modify_check->fcheckbox =_ 'X'_._
    ENDIF_._
    ENDIF_._
    if columnname = 'CHECKBOX_READ'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->checkbox_read =_ ' '_._
    ELSE_._
    lwa_modify_check->checkbox_read =_ 'X'_._
    ENDIF_._
    ENDIF_._
    *MODIFY TABLE csg_gt_list from l_wa_modify_check.
    flag_test = flag_test + 1_._
    ENDMETHOD_._ "check
    ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
    Please give me reward points

  • Filter report with checkbox

    I have a report (select A, B, C from TABLE1) on PAGE1
    I also added a little form on PAGE1. this form contains a list of checkbox generated dynamically with another query.
    I would like to filter my report with the values of the checked items in the form (so we get something like that : select A, B, C from TABLE1 where A in (checkbox1, checkbox4))
    Im using Apex 4
    Any idea how to achieve this ?
    thanks

    Hello quiqui42,
    You haven't given enough specific information about your situation, so I'll have to make some assumptions.
    I'm assuming that by "this form contains a list of checkbox generated dynamically with another query", you mean that you have a checkbox item that is based on a dynamic LOV. If this is the case, let's pretend that if checkbox 1 and checkbox 4 are checked, the value of the checkbox item (let's call it P1_FILTER) is "1:4".
    Now, there's probably lots of ways to do what you need to do, but I'll give you two. One is very easy, but could come at the cost of performance; the other is a little more involved but will execute much better on a large table, as long as what you're filtering on is indexed.
    Easy but potentially slow one:
    SELECT   a, b, c
      FROM   table1
    WHERE   INSTR(':' || :P1_FILTER || ':', ':' || a || ':') > 0;This could be a performance dog because it will not matter if column "a" is indexed - since you're running it thru a function the database will not use the index. Depending on the size of this table, this may or may not be a concern.
    Here is the more involved but better-performing one:
    1) Create a type:
    CREATE TYPE filter_vals AS TABLE OF VARCHAR2(10);      // replace varchar2(10) based on the size/type of your filter values2) Create a function:
    CREATE FUNCTION get_filter_vals(vals IN VARCHAR2)
       RETURN filter_vals
       PIPELINED
    IS
       arr  apex_application_global.vc_arr2 := apex_util.string_to_table(vals);
    BEGIN
       FOR i IN 1 .. arr.COUNT LOOP
          PIPE ROW (arr(i));
       END LOOP;
       RETURN;
    END get_filter_vals;3) Put this in the SQL for your report:
    SELECT   a, b, c
      FROM   table1
    WHERE   a IN (SELECT   COLUMN_VALUE FROM table(get_filter_vals(:P1_FILTER)));Step 1 creates a table type that is used by the function created in step 2. Step 2 is a pipelined function that turns a colon-delimited string (such as what is typically held in a list of checkboxes based on an LOV) into something that can be select-ed on just like a table. Finally, step 3 shows the query that uses the function in a way that allows a where-in clause, which will take advantage of an index on column "a" in a large table.
    Hope this helps,
    John

  • Reports with checkbox

    Hello Friends,
    I have one interactive report in which it displays 20 records with checkboxes for each.
    From 20 i have randomly selected 6 checkboxes.
    Now i want to display those 6 records in my first seconday screen.
    How to display it? Please give some example.
    Thanks in advance.
    Regards,
    n.i.m.z.

    hi
       the requirement can be done using the READ LINE command...just set the pf-status GUI in the program with a button CLIC
    report zsathish.
    DATA: BEGIN OF ITAB OCCURS 0,
         FLAG(1),
          MATNR LIKE MARA-MATNR,
          END OF ITAB.
    DATA: MLINE TYPE I, MPAGE LIKE SY-PAGNO.
    START-OF-SELECTION.
      SET PF-STATUS 'GUI'.
      SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 20 ROWS.
      LOOP AT ITAB.
        WRITE : / ITAB-FLAG AS CHECKBOX, ITAB-MATNR.
       Hide : itab-matnr.
      ENDLOOP.
    MPAGE = SY-PAGNO.
    MLINE = MPAGE * 72.
    AT user-command.
    case sy-ucomm.
      when 'CLIC'.
      DO MLINE TIMES.
        READ LINE SY-INDEX FIELD VALUE ITAB-FLAG.
        IF ITAB-FLAG NE SPACE.
          WRITE : / ITAB-MATNR.
        ENDIF.
      ENDDO.
    if helpful, reward
    Sathish. R

  • Custom PDF/RTF reports with Cocoon (problem with special characters)

    Hi all,
    I've setup application (APEX 3.0.1) with some custom PDF reports (using Cocoon 2.1.10),
    I'm generating my own hierarchical xml structure, using query with xmlelement() and xmlagg() functions,
    I cannot use built-in xml generator, because I need to get master-detail report with sub-grouping.
    Everything works fine if data in report doesn't contains special characters like "&",
    but Cocoon stops processing XML data when it found special character, following error is written to cocoon log:
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startElement] uri=,local=PRZEDMIOT,raw=PRZEDMIOT
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [startCDATA]
    INFO (2007-10-02) 12:34.16:828 [sitemap.transformer.log] (/cocoon/fop_post/) http-8888-1/LogTransformer: [characters] PPHU "T
    ERROR (2007-10-02) 12:34.16:828 [sitemap.generator.stream] (/cocoon/fop_post/) http-8888-1/StreamGenerator: StreamGenerator.generate()
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    ERROR (2007-10-02) 12:34.16:828 [sitemap.handled-errors] (/cocoon/fop_post/) http-8888-1/ErrorHandlerHelper: Failed to process pipeline
         at <map:serialize type="xml"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:22:32
         at <map:generate type="stream"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:18:33
         at <map:serialize type="fo2pdf"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:58:37
         at <map:transform> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:51:39
         at <map:transform type="log"> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:45:35
         at <map:generate> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/fop_post/sitemap.xmap:42:38
         at <map:mount> - file:/D:/oraclexe/apache-tomcat-6.0.13/webapps/cocoon/sitemap.xmap:1034:92
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    This error occur when Cocoon process folowing XML entity:
    <PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
    I tried to escape "&" character with CDATA section, but it didn't work.
    I tested following alternatives:
    <pre>
    <PRZEDMIOT>PPHU "T&M" Ltd</PRZEDMIOT>
    <PRZEDMIOT><PPHU &quot;T&amp;M&quot; Ltd.></PRZEDMIOT> --remove '<' and '>' characters
    <PRZEDMIOT><![CDATA[PPHU "T&M" Ltd.]]></PRZEDMIOT>
    </pre>
    but I still get the same error.
    Can anyone help me with this ?
    Thanks
    Tomasz K.

    Ok, I found that only '&' and '%' characters breaks Cocoon processing.
    The workaround is to use replace() function and change:
    '&' to '%26' and '%' to '%25', but I think that is a dirty way...
    Other characters like " - 'double citation' are succesfully escaped with xmlcdata() function.
    Perhaps someone know the simpler way to get Master/Detail PDF reports from APEX without using BI Publisher ???
    Actually I have page process invoked by button, which generates XML data, post it to Cocoon with UTL_HTTP and save generated PDF to database table (for future use).
    The same button invokes branch to URL with download procedure.
    Standard APEX reporting is not very usefull for me, because I don't know how to generate "complex" documents, with several grouping sections.
    I will be gratefull for any aid.

  • Interactive report with checkbox and editable field

    Hi,
    For a project I'm working on I need to create a interactive report in Apex 3.2 with the ability to select lines and to modify one of the columns in the report.
    To do this, I started off by adding these two fields to the selection query of my IR:
    apex_item.checkbox(1, product_number) cb
    and
    apex_item.text (2,QTY_TO_ORDER) QTY_TO_ORDER
    cb is the checkbox files, and QTY_TO_ORDER is the editable field.
    That worked like a charm and I got my two fields in the report.
    To process the values, I added this page process, wich for now should only store the "product number" and "QTY_TO_ORDER" fields in a table.
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.count LOOP
    insert into mytmptable values (APEX_APPLICATION.G_F01(i),APEX_APPLICATION.G_F02(i));
    END LOOP;
    commit;
    end;
    However, this doesn’t work the way I want it to work. When I check the checkboxes of two rows, it will store two rows with the right product numbers, but it will take the top two QTY_TO_ORDER field of the table regardless of which ones are checked. I was able to solve this problem, by adding a rownum to the query and using the rownum as the value for the checkbox. Since I still need the product_number and qty_to order fields I made them both text fields.
    I changed my page process to:
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.count LOOP
    insert into mytmptable values (APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i)),
    APEX_APPLICATION.G_F03(APEX_APPLICATION.G_F01(i)));
    END LOOP;
    commit;
    end;
    This seemed to solve the problem, and I now got the right values in the table, unless I used sorting in the report... As soon as I sorted the report in a way different than by rownum, I got the wrong values in the table. The reason for this is of course that my insert just selects the nTh row from the table, and my rownums aren't dynamic.
    I've found a lot of examples on the internet using '#ROWNUM#' in the selection, which should dynamically generate a rownum in the report. This seems to work in normal report, but in a interactive reports, the literal values '#ROWNUM#' shows up.
    Is there any way to solve this issue?

    Hi,
    Try with 3 fields:
    apex_item.checkbox(1, product_number) cb,
    apex_item.text (2,QTY_TO_ORDER) QTY_TO_ORDER,
    apex_item.hidden(3, product_number) prod_no
    The hidden field should be display as a hidden column.
    Then your process can be:
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.count LOOP
    FOR j in 1..APEX_APPLICATION.G_F03.count LOOP
    IF APEX_APPLICATION.G_F01(i) = APEX_APPLICATION.G_F03(j)) THEN
    insert into mytmptable values (APEX_APPLICATION.G_F01(i),APEX_APPLICATION.G_F02(j));
    exit;
    END IF;
    END LOOP;
    END LOOP;

  • Report with checkbox and collection

    Hi all
    I need to manage an interactive report to filtering and selecting rows by checkboxes and then use a collection to manage the selected records.
    I used a first collection to create the source record set by a On-Load Before-Header Process:
    DECLARE
    v_id NUMBER;
    var1 Varchar2(8);
    var2 Varchar2(10);
    var3 VARCHAR2(50);
    var4 VARCHAR2(10);
    var5 VARCHAR2(100);
    var6 VARCHAR2(5);
    cursor c_Populate is
    SELECT
    dep.chassis_code AS chassis_code,
    dep.model_code AS model_code,
    m.model_description AS model_description,
    dep.acc_doc_number AS acc_doc_number,
    dest.description AS destination_descr,
    (trunc(sysdate) - dep.entry_date) Anzianita
    FROM deposit_chassis dep, warehouses w, warehouse_map map, models m, site s,
    destinations dest, T_SUB_DESTIN_DEALERS sdd
    WHERE
    dep.status = 5 AND
    w.ware_code = map.ware_code AND
    dep.DEALER_CODE = sdd.DELIVERY_POINT AND
    dep.DESTINATION_CODE = sdd.DESTINATION_CODE AND
    map.map_code = dep.map_code AND
    m.model_code = dep.model_code AND
    DEP.UNLOADING_SITE = S.SITE_CODE AND
    DEP.destination_code = dest.destination_code And
    dep.unloading_site = 'S0000074' and w.site_code = 'S0000074';
    i NUMBER;
    BEGIN
    APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'MY_COLLECTION');
    OPEN c_Populate;
    LOOP
    FETCH c_Populate into var1, var2, var3, var4, var5, var6;
    EXIT WHEN c_Populate%NOTFOUND;
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'MY_COLLECTION',
    p_c001 => var1,
    p_c002 => var2,
    p_c003 => var3,
    p_c004 => var4,
    p_c005 => var5,
    p_c006 => var6);
    END LOOP;
    CLOSE c_Populate;
    END;
    Then I created a region for a SQL report:
    SELECT
    APEX_ITEM.CHECKBOX(1,c001) Chk,
    apex_item.text(2, c001) Telaio,
    apex_item.text(3, c002) ModelCode,
    apex_item.text(4, c003) Model,
    apex_item.text(5, c004) Doc_Number,
    apex_item.text(6, c005) Destination,
    apex_item.text(7, c006) Age
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION';
    Then, with a submit button and the relative process (below), I need to load a new collection for further elaboration.
    How can I obtain the single values for each field of my selected row (see MY_COLLECTION) ?
    APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'COL_AVAILABLE_CHASSIS');
    FOR i IN 1..APEX_APPLICATION.G_F01.Count
    LOOP
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'COL_AVAILABLE_CHASSIS',
    p_c001 => I need the Telaio
    p_c002 => I need the ModelCode
    p_c003 => I need the Model
    p_c004 => I need the Doc_Number
    p_c005 => I need the Destination
    p_c006 => I need the Age
    END LOOP;
    Thanks in advance,
    Massimo

    Dear Jari
    I've looked at your sample.
    Yes it seems ok for my apps
    So, i've done the following update to my code:
    Souce Report
    SELECT
         APEX_ITEM.CHECKBOX(3,c001) Chk,
         APEX_ITEM.TEXT(4,c001) Telaio,
         APEX_ITEM.TEXT(5,c002) ModelCode,
         APEX_ITEM.TEXT(6,c003) Model,
         APEX_ITEM.TEXT(7,c004) Doc_Number,
         APEX_ITEM.TEXT(8,c005) Destination,
         APEX_ITEM.TEXT(9,c006) Anzianita
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION'
    The Submit Process
    DECLARE
      l_row NUMBER := 1;
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F03.COUNT
      LOOP
        FOR j IN l_row..APEX_APPLICATION.G_F04.COUNT
        LOOP
          IF APEX_APPLICATION.G_F04(j) = APEX_APPLICATION.G_F03(i) THEN
              -- ONLY FOR TEST PURPOSE --
            htp.p('Telaio: '||APEX_APPLICATION.G_F03(i));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F04(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F05(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F06(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F07(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F08(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F09(j));
            l_row := j + 1;
            EXIT;
          END IF;
        END LOOP;
      END LOOP;
      COMMIT;
    END;
    Is it correct to manage G_F0x like my code ?
    Thanks,
    Massimo

  • Report with checkbox to PDF-File with BI Publisher

    Hello,
    I am able to create reports in APEX to create PDF-Files. We are using the BI Publisher.
    Now we have to design a rft-Template with a checkbox. In BI Publisher it works with the checkbox greate, but if I create in APEX report and a layout the checkbox is not display in the PDF-File.
    Does anyone has a solution for that?
    Regards,
    Mark

    I have a same issue ...
    How you are calling a bi report from apex....?
    Please help me...
    ty

  • Interactive Report with Checkbox column

    Hello everyone,
    our users love the Interactive Report filtering, so they want all forms in apps. to behave like Interactive Reports.
    I need a form where each row consists of 2 columns and a checkbox, that handles some flag. I can create checkboxes using APEX_ITEM, however, the filtering on such column look ridicolous. I would like to have a tabular form (with one editable checkbox column), but with all those Interactive Report filtering features.
    Is there any example (or inspiration) how to achieve such functionality?
    Thanks a lot!
    Adam

    Hello Adam,
    Why don't you just switch off the Filtering option for that column?
    (Go to the Interactive Report, click on your column, then in Column Definition you can (un)check the features for that column).
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Deleting With Checkboxes Problem

    I have created queries and processes as per the How To's etc. for deleting rows via check boxes. The problem I am having is that if the query returns 3 records for example and I select only 1 via the check box, all 3 records end up being deleted.
    This is my query which is in an SQL Query (updatable report) region;
    select
    htmldb_item.checkbox(1,"a"."FUNDING_ID") "DEL",
    "a"."FUNDING_ID",
    "b"."CONSTRUCTOR",
    "a"."YEAR",
    "a"."CAPEX",
    "a"."OPEX"
    from "BCR_Funding" "a", "BCR_Constructor" "b"
    where "PROJREV_ID" = :P10_REVIEWID
    and "a"."CONSTRUCT_ID" = "b"."CONSTRUCT_ID"
    and "a"."REQ" = :P10_REQ
    order by "b"."CONSTRUCTOR", "a"."YEAR"
    Note that "FUNDING_ID" is the primary key in "BCR_Funding".
    I have a "Delete Checked" button and the process behind it is as follows;
    delete from "test_tab";
    for i in 1..htmldb_application.g_f01.count
    loop
    insert into "test_tab" values (BCR_SEQ.nextval, htmldb_application.g_f01(i));
    delete from "BCR_Funding" where "FUNDING_ID" = htmldb_application.g_f01(i);
    end loop;
    I am using "test_tab" to see which values are being returned by the htmldb_application function.
    At the completion of the process, "test_tab" contains the following
    test id
    5052 5049
    5053 5050
    5054 5050
    5055 5051
    "test" is simply the PK for the "test_tab" table. "id" contains the values of "FUNDING_ID" returned and deleted. Note that only id = 5050 was selected for deleting via the checkbox, yet 5049 and 5051 were deleted also.... @#$%#@
    I want this to work such that only 5050 would be deleted...

    I have modified the process code to the following to try and see what's going on;
    declare
    str varchar(5);
    begin
    delete from "test_tab";
    str:= to_char(htmldb_application.g_f01.count);
    for i in 1..htmldb_application.g_f01.count
    loop
    insert into "test_tab" values (BCR_SEQ.nextval, to_char(htmldb_application.g_f01(i))||' ('||to_char(i)||' of '||str||')');
    delete from "BCR_Funding" where "FUNDING_ID" = htmldb_application.g_f01(i);
    end loop;
    end
    It would appear that if the query returns x rows and I select the checkbox in y rows, then the process attempts to delete x+y rows.
    I have before and after screen images, i.e. before and after the "Delete Checked" button is hit which I can e-mail.
    Hope someone can help....

  • Detaliate report with checkbox

    So I made a report of a table on a page, but i have selected only a few columns 3/7. Now, i want that using checkboxes (or radio?) i want to select a specific line and then take me to another page to see the whole report only of that selected line 7/7. Can I do such thing?

    Hi
    OK - My reports are on two pages - 109 (partial report) and 110 (full report).
    The SQL query for the report on 109 is:
    SELECT APEX_ITEM.CHECKBOX(1, EMPNO) SHOW_DETAILS,
    EMPNO,
    ENAME,
    JOB
    FROM EMPThe SHOW_DETAILS column creates the checkboxes with the EMPNO as their values. Because I'm using the APEX_ITEM.CHECKBOX() function to create these, when the page is submitted I then have access to the APEX_APPLICATION.G_F01 collection (in a similar way to using a tabular form). I get the EMPNO values selected using a PL/SQL process on the page:
    DECLARE
    vFILTER VARCHAR2(1000);
    BEGIN
    vFILTER := APEX_UTIL.TABLE_TO_STRING(APEX_APPLICATION.G_F01);
    APEX_UTIL.SET_SESSION_STATE('P110_FILTER', vFILTER);
    END;This just converts the collection into a single string and sets an item on page 110 to this. This string will be in the format 1:2:3
    There is a button that triggers the process and then a branch to page 110
    On page 110, the report's SQL is:
    SELECT EMPNO,
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    COMM,
    DEPTNO
    FROM EMP
    WHERE ':' || :P110_FILTER || ':' LIKE '%:' || EMPNO || ':%'The report region also contains the "Hidden and Protected" item called P110_FILTER - this is populated using the process on page 109 and used as a filter on the report on page 110
    There is a back button to go back to page 109 - this also clears the cache for page 110
    Andy

  • Problem report with no problem

    I've made an additional discovery about this problem and I've amended my original post below:
    For some unknown reason, after I save my Premiere Pro CC project and "Quit", I get a "Problem Report" that "Adobe Premiere Pro CC has quit unexpectedly."
    This happens only if the sequence is open in the timeline.  The sequence plays fine otherwise.  If the sequence is closed, there's no "quit unexpectedly" message.
    Either way, the project file is saved and fine.  It reopens fine.  But everytime I quit with the sequence open, the same problem report.
    It doesn't seem to be causing any further problems other than unnerving me.
    I restarted holding the option (alt) key on my Mac, but that didn't help.  Any other thoughts?  I can post the error thread if someone knows how to read those.  Thank you.

    You could ask for a manager at the Apple Store and see if they will let you try a swap, but I agree if it is a post paid plan problem with Verizon then swapping out the iPad is not going to accomplish anything. But you can try, just remember to make a Genius Bar appointment and ask for a manager.
    Since this is not a problem with Verizon users on a different plan, and not at all with AT&T or Sprint, this will definitely be something Verizon will have to rectify. Apple has no authority to do that so your energies would be better spent with customer service at Verizon.

Maybe you are looking for

  • What can open/edit an .ai file TEXT layer (besides Illustrator)?

    so, i have CS6 on Mac (OS Mavericks). my Mac took a nose dive recently. long story super short... i have a new mac & re-installed my CS6 on it. but, in order to launch Illustrator, it requires that i install JAVA too. and i just really don't wanna do

  • IPhone 4 and Apple Component Cables do not work

    I have an iPhone 4 and my Apple Component Cables no longer work. I have had an iPhone 3G since July 2008, and a first gen iPod Touch. They both have and continue to work with the cables. I have the Component cables hooked up to an Apple universal doc

  • Linking songs in iTunes

    I have a set of songs that should be played sequentially. I looked in the advanced menu tab, and it had a choice for Join CD Tracks. This sounds like it would do what i wanted to do it do , but I can't get it to work. I went to the help and, as usual

  • Very slow broadband connection

    Since being with BT, I have never had a particularly fast connection, but in the past two weeks it has slowed down to an average of 0.2Mb/s which anyone will agree is practically useless...even simple web pages are now slow to load now. This is not d

  • Changing all Layer names to Uppercase

    I have been trying to clean up the layers in a document(s) with the following script.  It all works except for the UPPERCASE line. Does anyone have any ideas? function standardizeLayerNames()                 var myDoc7=app.activeDocument