Checkbox in report interactive

how possible mark all checkbox´s with a button in a report interactive ?
anybody have a code font ?
thanks !

Hi Ricardo Birigui,
You could have search the forum for the answer. Anyway this link may give your answer:
Re: Check Box in a Form - Select and Unselect All Values
Regards
Rana

Similar Messages

  • Add buttons in download region (Report Interactive)

    Hi all,
    Is it possible to add more buttons in download region in Report Interactive, such as PDF 1, PDF 2 .... ?
    I used OC4J and FOP (Print Server) to download PDF for testing, but it is so limited. When I use break column and export it to PDF, instead of to show a break, the PDF file shows an ordinary report.
    Therefore, I think the best idea is create two buttons and link for another page and do whatever I want, as PLPDF.
    :S
    Thank you,
    Eric

    Hi Eric,
    a nice way to do this is use the "IR customs actions menu" plugin (http://apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/ir-actions-menu-item_171.html) , so you can add extra menu's to the actions menu in your IA report.
    Regards
    Bas

  • HTML Code text appearing instead of checkbox in an interactive report

    Hi All,
    When I try to include a check box column in an interactive report only the HTML text is being displayed as
    <input type="checkbox" name="f01" value="1739" />.
    However check boxes are working fine in other application and also in other sample test reports that I've tried on...
    Could you please give any ideas as to why this is happening?
    Thanks in Advance

    Hi,
    Change column to Standard report column from report attributes.
    Br, Jari

  • Check all checkbox in an interactive report

    Hi,
    I would like to add a "check all" functionality in an interactive report. I've done that by adding a javascript function to the header, but when I click the column header to check all the page first executes the javascript that is used by the interactive report (sorting etc). Is there a way to disable this javascript for just the checkbox clolumn, so that my own javascript code is executed?
    Or is there another way to add this functionality to the IR?
    Thanks

    That works great! Thanks jarola
    The complete answer in case anyone needs it is to first include the checkbox column in your IRR query
    APEX_ITEM.checkbox (1, ca.id) del
    Then include this as the column heading
    <input type="Checkbox" onclick="$f_CheckFirstColumn(this)">
    Then include the code as identified by jarola in the page HTML Header
    <script type="text/javascript">
    addLoadEvent(RemoveChkOnclick)
    function RemoveChkOnclick(){
    $x('apexir_DEL').onclick='';
    </script>
    Edited by: Bill Wheeling on Aug 1, 2010 4:12 AM
    Edited by: Bill Wheeling on Aug 1, 2010 4:36 AM

  • How to use checkbox in reports

    Hi,
    I am stuck a little here.I have given some selection-options,
    few parameters on screen and two checkboxes.
    How will i know which one is clicked.I will be glad if someone can provide me small snippet .

    Hi,
    see the sample code for interactive list and do accordingly
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and
    F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed
    secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is
    being created, SY-LSIND still has the value 1.
    Just refer this:
    https://forums.sdn.sap.com/click.jspa?searchID=12296381&messageID=3504529
    Regards,
    Shiva Kumar

  • Use of Checkbox in Report for calculation and determine checked records

    Dear All,
    Application Express 4.0.1.00.03
    I have a Report based on Invoice table which displays unpaid Invoices.
    Also I have added one check box (Not a column in Invoice field) to each row of the report query, the user will be check to pay the Invoice, on checking of the Invoices I need to
    1. Calculate the total of Invoice Amount for selected Invoices.
    2. After selection of Invoices User will click on a Button which will open the Payment Form (New Page or Same Page Region),
    but some way I need to know the Invoice No. of each Invoice row selected so that I can use all the selected Invoice No's for creating the Payment.
    3. Any way to add a button on each row of the Invoice that will be used for the Payment of that Invoice only.
    One way can be to create a column to save the check box value which I am aware of, but am looking for other alternate if possible.
    Hoping for some good solution.
    Thanks & Regards
    Arif Khadas

    vee wrote:
    You would need to make the amount column(the one which is used for total) editable so that its value can be accessed easily from JS. You can made it read-only if required ( apex_item.text(2,INV_RENT_VALUE + INV_OTHER_VALUE ) ?? ) .
    How can I make it read only, there is no such attribute which can be set for report column as it exists for Items.
    Also Now I have the following report query:
    SELECT  INV_LSE_NUM                      "Contract No.",
            INV_FROM_DATE                    "Collection Date",
            INV_FROM_DATE                    "From Date",
            INV_TO_DATE                      "To Date",
            INV_RENT_VALUE + INV_OTHER_VALUE "Invoice Amount",
            INV_AMOUNT_PAID                  "Amount Paid",
            INV_RENT_VALUE + INV_OTHER_VALUE
                           - INV_AMOUNT_PAID "Balance",
            INV_NUM                          "Invoice No.",
            'Pay'                            "Pay",
            APEX_ITEM.CHECKBOX (1, INV_NUM)  "CB_PAY",
            APEX_ITEM.TEXT (2, INV_RENT_VALUE + INV_OTHER_VALUE - INV_AMOUNT_PAID)
                                             "BAL"
    FROM    RE_INVOICE
    WHERE   INV_COM_NUM    =  :P0_COM_NUM
    AND     INV_RENT_VALUE + INV_OTHER_VALUE > INV_AMOUNT_PAID
    AND     INV_LSE_NUM    =(SELECT TO_NUMBER (C001)
                             FROM   APEX_COLLECTIONS
                             WHERE  COLLECTION_NAME = 'LEASE'
                             AND    SEQ_ID          = TO_NUMBER (:P24_SR_NO))The Next thing is the HTML Header for the Page:
    <script language = "JavaScript" type="text/javascript">
    total = 0;
    $('input[name=f01]:checked').each( function(){
      parent_row = $(this).parents('tr:first');
      amt = ( parent_row.find('input[name=f02]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f02]').val() );
      total += amt;
    $s('TEST',total);  -- Test is an Item on the Page.
    </script>Also I checked from the Page source "CB_PAY" and "BAL" have names f01 and f02 respectively.
    Even now when I check or un-check the Value in TEST item is not displayed as required.
    Anything more is required, what am I missing.
    Thanks & Regards
    Arif Khadas

  • Row Selector Checkbox in Report throws "wwv_flow.accept" Error when checked

    Hello all,
    I ran into some time consuming trouble on
    a page of an assistant flow contains a report regions. Users shall select one or many rows from the report.
    The checkbox was added as a linked column and formatted as "Simple Checkbox".
    After submitting to the "NEXT" page an item :Px_MYEVENTS shall collect the ID column value of all selected rows.
    The page process "After Submit" shows:
    +:P2_Myevents := apex_util.table_to_string(apex_application.g_f01,';');+
    It is expected that only selected rows appear on the item, because we need this for further activities.
    On testing strange things happens:
    If no selection is done, the target page appears, the item :Px_Myevents contains the values of all rows
    When a selection is done, the branch error "wwv_flow.accept" appears, :Px_Myevents doesn't contain a value.
    This throws even when the code is used as a DA of type PLSQL - statement or function
    How do I get the expecte behaviour?
    Edited by: F Lan on 27.09.2012 13:18
    Apex Version is 4.1.1 on Oracle 11GR2 XE
    Remember the milk ;-)
    Regards

    Hi,
    Always state
    <ul>
    <li>Apex Version</li>
    <li>DB Version and edition</li>
    <li>Web server used.I.e. EPG, OHS, ApexListner Standalone or with J2EE container</li>
    <li>When asking about forms always state tabular form if it is a tabular form</li>
    <li>When asking about reports always state Classic / IR</li>
    <li><b>Always post code snippets enclosed in a pair of &#123;code&#125; tags as explained in FAQ</b></li>
    </ul>
    The following line ought to work they way you want it to , I have used this construct without issues
    :P2_Myevents := apex_util.table_to_string(apex_application.g_f01,';');
    If no selection is done, the target page appears, the item :Px_Myevents contains the <b>values of all rows</b>This suggests that all checkboxes are being treated as checked.
    You need to check why they are being treated as checked. Depends how they are rendered and if they are being manipulated in some way.
    The other point to consider is the Processing Point. The above process must run before ApplyMRU/ApplyMRD.
    You could try running the form in debug mode to see if it revealing anything in the Debug Report.
    The other way is to put it up on apex.oracle.com for someone to take a closer look at it.
    Cheers,

  • Checkbox in report

    I am trying to duplicate (somewhat) some an idea presented by Denes
    http://htmldb.oracle.com/pls/otn/f?p=31517:123
    in his excellent example, but I cannot seem to get a handle on his update process is doing:
    See some of my confusing comments inline:
    -------------code starts
    DECLARE
    vrownumber BINARY_INTEGER;
    vfound BOOLEAN;
    BEGIN
    -- update new checkboxes
    FOR ii IN 1 .. HTMLDB_APPLICATION.g_f07.COUNT -- your checkbox
    LOOP
    vrownumber := HTMLDB_APPLICATION.g_f07 (ii);
    -- only if checkbox hasn't been checked before
    IF NVL(HTMLDB_APPLICATION.g_f06 (vrownumber), '0') <> 'Y'
    THEN
    UPDATE emp_garbage
    SET check_char = 'Y'
    WHERE empno = HTMLDB_APPLICATION.g_f01 (vrownumber);
    END IF;
    END LOOP;
    -- remove old checkboxes
    FOR ii IN 1 .. HTMLDB_APPLICATION.g_f06.COUNT --why is this used?
    LOOP --
    -- only if the checkbox was already set
    IF HTMLDB_APPLICATION.g_f06 (ii) IS NOT NULL
    THEN
    vfound := FALSE;
    FOR jj IN 1 .. HTMLDB_APPLICATION.g_f07.COUNT -- your checkbox
    LOOP
    -- is the checkbox still checked?
    IF HTMLDB_APPLICATION.g_f07 (jj) = ii
    THEN
    vfound := TRUE;
    EXIT;
    END IF;
    END LOOP;
    IF NOT vfound
    THEN
    UPDATE emp_garbage
    SET check_char = 'N'
    WHERE empno = HTMLDB_APPLICATION.g_f01 (ii);
    END IF;
    END IF;
    END LOOP;
    -- do the rest of the update
    FOR i IN 1 .. HTMLDB_APPLICATION.g_f01.COUNT
    LOOP
    --are these references to column numbers? 
    --if so, does it matter if they are hidden or not?
    UPDATE emp_garbage
    SET ename = HTMLDB_APPLICATION.g_f02 (i),
    job = HTMLDB_APPLICATION.g_f03 (i),
    sal = HTMLDB_APPLICATION.g_f04 (i),
    comm = HTMLDB_APPLICATION.g_f05 (i)
    WHERE empno = HTMLDB_APPLICATION.g_f01 (i);
    END LOOP;
    COMMIT;
    END;
    ------------------code ends
    More questions: Are the HTMLDB_APPLICATION.g_f?? values dependent on the query order or the order that is displayed in the report?
    Denes is using a field check_char to hold the value, and I am using a field called approval. I also do not want fields (other than the 'approval' field to be updateable from the [updateable] report. Denes is using updateable fields in his example, and if I set a field to be a report field rather than editable, the app breaks. Why?
    I have read the documentation on the checkbox function, but it does not help a lot; and I have not found other explanations in this forum.
    thanks in advance!
    Mike
    P.S. Would it be possible to combine the click event in the checkbox to automatically post the change in the db? Presuming that this takes javascript, is this type of thing hard to do?

    Mike,
    irst I am wondering what version of Apex and Oracle
    you are using as the example you are phising around
    in was written for Apex 2.2 (HTML DB). 3.1
    >
    You should not have any issues but it is good
    practice to recode the HTMLDB_APPLICATION to
    Apex_APPLICATION.
    agreed.
    Specific to your questions: Are the
    HTMLDB_APPLICATION.g_f?? values dependent on the
    query order or the order that is displayed in the
    report? I am not sure what you mean by order that is
    displayed, but if you mean the position of the item
    .g_f(#) then yes. This refers to the position in the
    field, example your query has 6 outputs labeled
    1 = .g_f01
    2 = .g_f02
    3 = .g_f03
    4 = .g_f04
    5 = .g_f05
    6 = .g_f06
    As to the next question, "I also do not want fields
    (other than the 'approval' field to be updated from
    the [updated] report. Denes is using updated fields
    in his example, and if I set a field to be a report
    field rather than editable, the app breaks. Why?" What I meant about the order is that you can change the display order in the report (select the report attributes tab from the report region and toggle the display order) and not change the order in the original query. Is it the query order or the display order that matters? As for the example report itself, I refer you to Denes' example. He has 10 fields total, and 6 are editable, two are hidden.
    I would actually need to see how you have written this
    portion of the query as for myself I would have the
    querried and displayed normally and not address it as
    .g_fXX.
    I have not written it...
    Here is the query from Denes application:
    SELECT empno, empno empno_display, ename, job, sal, comm, check_char,
    HTMLDB_ITEM.checkbox (7,
    '#ROWNUM#',
    NULL,
    DECODE (check_char, 'Y', '#ROWNUM#')
    ) check_box, check_char checkbox_display
    FROM emp_garbage
    and ot your last question;
    P.S. Would it be possible to combine the click event
    in the checkbox to automatically post the change in
    the db? Presuming that this takes javascript, is this
    type of thing hard to do?
    Yes is the simple answer, you have the option under
    the edit region to allow an end user to update the
    form as well as write into the code the option to
    update the Database directly with something as simple
    as a button.
    Hope this helps,
    Randy

  • Use of Checkboxes on reports

    Hi
    I am using the HTMLDB_ITEM.CHECKBOX function. It works fine in the report, as below;
    SELECT
    "POOL_CARS"."ID" "ID",
    "POOL_CARS"."REG_NUM" "REG_NUM",
    "POOL_CARS"."MAKE" "MAKE",
    "POOL_CARS"."BHP" "BHP",
    "POOL_CARS"."PURCHASE_DATE" "PURCHASE_DATE",
    "POOL_CARS"."MODEL" "MODEL",
    "POOL_CARS"."COLOUR" "COLOUR",
    "POOL_CARS"."STYLE" "STYLE",
    "POOL_CARS"."PRICE" "PRICE",
    "POOL_CARS"."AVAILABLE" "AVAILABLE",
    HTMLDB_ITEM.CHECKBOX(1,"AVAILABLE",
    DECODE(AVAILABLE,'Y','CHECKED',null)) "Av ",
    "POOL_CARS"."DEPT" "DEPT"
    FROM
    "#OWNER#"."POOL_CARS" "POOL_CARS"
    I want to use the checkbox to cause an update to the table (set Avail to Y where the box is checked, and to N for all other rows). So I have then created a submit button and a process to be run as follows
    FOR I in 1.. HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE POOL_CARS
    SET available = 'Y'
    WHERE ID = to_number(HTMLDB_APPLICATION.G_F01(i));
    htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    I have a few problems here.
    1. When the page is run the check boxes show up fine. When submit is pressed I get
    ORA-01722: invalid number.
    2. The line 'htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));' does not seem to do anything !
    3. I do not understand how to connect the current line within the loop to an actual row as the where clause is not realistic.
    Can anyone help.? .

    Jelane,
    You have to reference the "ID" in your htmldb_item.chekbox api:
    htmldb_checkbox(1,"ID",.....
    Hope this helps,
    Jos

  • Populating apex item checkbox in report row based on database value

    Hi All
    I am looking for help setting an apex item checkbox to 'checked' depending on a record exisiting in a database and I would appreciate a little guidance.
    At the moment I have a report which looks a bit like this
    SELECT licence_user_identifier,
    description,
    licence_name,
    apex_item.checkbox(22,licence_id)
    FROM TABLE(SOL_LICENCE.F_RETRIEVE_ORG_LICENCES ( 121 ));
    4 columns and the last column is a checkbox called 'assign' and is used to assign the selected licence to a user(who is already displayed on the page in another table). There is save button which when clicked saves a record to the database if the checkbox is selected.
    However when the page is displayed the checkbox should be prepopulated/checked if there is a record in the database saying that the licence is assigned to the current user. I have created a page process to try and collect this information and populate the checkboxes on load - before header. However I am having difficulty referencing the apex_application item the corresponds to each row because when I use the FOR i IN 1 .. apex_application.g_f22.COUNT LOOP it only selects the item if it is checked. Can anyone point me in the right direction?
    here is the process I have to populate the checkboxes, it is not getting to my flow.debug as there are no selected checkboxes:-(
    DECLARE
    v_count     NUMBER;
    CURSOR getlicences (p_co_id so05.co_id%TYPE)
         IS
    SELECT     licence_id
    FROM     so05_cust_org_licences
    WHERE     co_id = p_co_id;
    BEGIN
         IF :p9_co_id IS NOT NULL
         THEN
              FOR each_rec IN getlicences (:p9_co_id)
              LOOP
                   --check if a record exists
                   SELECT     COUNT ( * )
                   INTO     v_count
                   FROM     so05_cust_org_licences
                   WHERE     co_id = :p9_co_id AND licence_id = each_rec.licence_id;
    --if the record exists populate the checkbox
                   IF v_count > 0
                   THEN
                        FOR i IN 1 .. apex_application.g_f22.COUNT
                        LOOP
    wwv_flow.debug ('bbbbbbbbbbccccccccccandwearein' || v_count);
                             IF apex_application.g_f22 (i) = each_rec.licence_id
                             THEN
                                  apex_application.g_f22 (i) := 1;
                             END IF;
                        END LOOP;
                   END IF;
              END LOOP;
         END IF;
    END;
    Thanks in advance
    Lynn

    Hi,
    Sorry my mistake. You can use the above link only to solve this problem, for this you have to use a hidden column to which you will assign 'Y' or 'N' as mentioned in that post.
    using that hidden column value you can fire your query accordingly.
    let's say your hidden column is f01 and checkbox column is f02 and the id column is f03, you can do like this
    create a process before your update process like this
    BEGIN
        -- Reset the hidden ADMIN_USER flag for all visible records to N
        -- Note: g_f01 maps to the hidden ADMIN_USER column
        FOR ii IN 1 .. APEX_Application.g_f01.COUNT
        LOOP
            APEX_Application.g_f01(ii) := 'N';
        END LOOP;
        -- Set the hidden ADMIN_USER flag for those records where the
        -- checkbox has been set by the user to Y
        -- Note: g_f02 is the checkbox column ADMIN_USER_CHECKBOX
        FOR ii IN 1 .. APEX_Application.g_f02.COUNT
        LOOP
            APEX_Application.g_f01(APEX_Application.g_f02(ii)) := 'Y';
        END LOOP;
    END;then write a new process positioning after above process
    if apex_application.g_f01 = 'Y' then
      your update query using id column (f03)
    else
      your delete query using that id column (f03)
    end if;hope this helps you.
    Thanks
    Tauceef

  • Multiple checkboxes in report

    Hi ,
    I have a requirement to show a check box to each row in a report and delete the rows which has enabled .
    Here am using apex_item.check box(1,empno,'UNCHECKED') " ", in a query ,but i am unable to see check box in output.
    instead of check box it showing like*<input_type value=empno>*
    Please help me to solve a problem..
    Thanks in advance
    Regards
    Narender B

    Hi ,
    As you said i used apex_item.checkbox(1,empno,null) " " then in output it is showing like this
    *<input type="checkbox" name="f01" value="3478505606638632" />*.
    please help me on this issue
    Regards
    Narender B

  • How to create dropdown or checkbox in report painter?

    hi experts,
    I would like to ask on how to create a dropdown / checkbox in my report painter's selection
    screen.
    thanks,

    Hi,
    For check box and list box look at the below example,
    TYPE-POOLS: vrm.
    DATA: w_param TYPE vrm_id,
          it_values TYPE vrm_values,
          wa_value LIKE LINE OF it_values.
    PARAMETERS: p_rec_ty AS LISTBOX VISIBLE LENGTH 10,
                p_check AS CHECKBOX.
    AT SELECTION-SCREEN OUTPUT.
      w_param = 'P_REC_TY'.
      wa_value-key = '1'.
      wa_value-text = 'AAAAA'.
      APPEND wa_value TO it_values. "Add values like this for the list box
      wa_value-key = '2'.
      wa_value-text = 'BBBBB'.
      APPEND wa_value TO it_values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = w_param
          values = it_values.
    START-OF-SELECTION.
      READ TABLE it_values INTO wa_value INDEX p_rec_ty. "Get the value for the particular key
      WRITE: wa_value-text , p_check.
    Regards,
    Maoj Kumar P
    Edited by: Manoj Kumar on Feb 6, 2009 10:54 AM

  • Checkboxes in report to insert or update a value, doesn't do both

    I'm going crazy trying to solve this, hopefully someone can help me out. At the moment, I have a credit card table that will contain the information relating to a user-credit card pairing. Banks and such can submit credit cards to users, and the credit card table will be updated, with the column Approved_Flag being set to "N". Now, in another page, I have a report that displays any credit cards that a user may want, along with checkboxes. This report contains any bank submitted cards, or any cards that have been marked "General". Users can decide which ones they would like to keep, and then hit a submit button, which will update the credit card table. Existing records in the table would have the Approved column marked 'Y', new records from the so called "General" cards would be inserted.
    The issue is that with the code I've written, it updates any existing records in the credit card table perfectly, but it will not insert any new information. The following is my code for the process that activates when the submit button is hit:
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    MERGE INTO ls_credit_cards dest
    USING( SELECT apex_application.g_f01(i) credit_card_id,
    :F125_USER_ID created_by,
    sysdate created_on,
    :P54_CARDS card_id,
    :P54_USER user_id,
    'Y' approved_flag
    FROM dual) src
    ON( dest.credit_card_id = src.credit_card_id )
    WHEN MATCHED
    THEN
    UPDATE SET dest.approved_flag = src.approved_flag
    WHEN NOT MATCHED
    THEN
    INSERT( credit_card_id,
    created_by,
    created_on,
    card_id,
    user_id,
    approved_flag )
    VALUES( src.credit_card_id,
    src.created_by,
    src.created_on,
    src.card_id,
    src.user_id,
    src.approved_flag );
    END LOOP;
    Through some testing, I've found out the the issue is any "General" credit cards will not have a credit card ID assigned to them. By hard coding it, I can get them to insert, but then existing records do not get updated. I've used this code to assign each checkbox in the table a credit_card_id (I think...) so I don't understand why this isn't working.
    APEX_ITEM.CHECKBOX(1,credit_card_id) " ",
    Could anyone shed some light on how I can do this? I would appreciate it IMMENSELY

    A Trigger is just a set of code that runs when certain DML events are applied to a specific table. Here's an example of a simple trigger that assigns a value to a key field when no value is supplied (NULL). Notice that the trigger makes use of another structure - a Sequence - for determining the ID. Sequences are just auto-incrementing values that are very useful for deriving unique values for use in primary key fields, etc.
    Here's an example of how to create a sequence using SQL:
    CREATE SEQUENCE SEQ_MVR_RATING_SCALE
        MINVALUE 1 INCREMENT BY 1 START WITH 1
    /You can also create them directly using the SQL Workshop portion of the APEX console.
    Here's an example of how to create a trigger that uses that sequence to populate the key value:
    CREATE OR REPLACE TRIGGER  BI_MVR_RATING_SCALE
      before insert on MVR_RATING_SCALE
      for each row
    declare
    begin
      if :NEW.MVR_RATING is null then
        select SEQ_MVR_RATING_SCALE.nextval into :NEW.MVR_RATING from dual;
      end if;
      if :NEW.ENTERED_BY is null then
        :NEW.ENTERED_BY := FN_GET_USER(nvl(v('APP_USER'),user));
      end if;
      :NEW.ENTERED_ON := SYSDATE;
    end;
    /Without giving you a complete tutorial on triggers, just note the call to SEQ.nextval. That's what retrieves the next value from the sequence and tells the DB engine to increment the sequence value. The next time it is called, it will then be a different value.

  • Basic report, Interactive report

    Hi i am new in report . Anybody can help me regards this . I need material with examlpe (Proper coding also ).  Help me in interactive report also. send through my mail id [email protected]
    Edited by: supriya satapathy on Oct 14, 2008 7:29 AM

    Hi supriya,
    Goto tcode ABAPDOCU or http://help.sap.com.
    you'll find reports etc with examples wrt syntax, use .
    Regards,
    Amit

  • Suggestions to add checkbox to Report

    Version : 4.1.0
    Hi There,
    We have a classic report on an SQL. Now there is a requirement to add some sort of a check box against each report row where the user if selected, it marks that record as a favorite. That checkbox value will be stored in the table.
    If it was a tabular form, I could have just added that as a checkbox and a DB column and it would get updated when the user hit the submit button, any suggesstions on how to do this on a report? Or the only way would be to convert the report to a tabular form ? Not sure, how to capture the Radio values. Any better suggestions are also welcome.
    thanks,
    Ryan

    Hi ryansun
    you can add checkbox to your report.
    Suppose this is your query report
    SELECT empno,
           ename,
           job
    FROM   empyou want to add checkbox to your report then try the below code
    SELECT APEX_ITEM.CHECKBOX(1,empno) " ",
           ename,
           job
    FROM   emp
    Click on report attributes then edit the checkbox column
    under column attributes
    set Display as = Standard Report Column
    For detail information follow the link given below
    http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDDCHAF
    Hope this will solve your problem.
    Regards,
    Jitendra

Maybe you are looking for

  • Safari wont open at all

    I just updated my safari last night and ever since i did it wont work. if i click the exe to open it i get the hourglass telling me its loading but then it just stops and nothing happens not even an error message. I've tried restarting my computer se

  • Purchase requisition with operation item

    Hello all, When I create a maintenance order with one operation with control key PM02 and with one component the system generates PR with 2 items. The first item is always created from the operation. I would like to know if there is a way to prevent

  • Help in Swing

    Hi I am trying to create a demo field set with three textfields and three buttons a Up Arrow ,Down Arrow and Delete button. However my problem is that creation is fine... but clicking on the Up Arrow button should add one row above and the three text

  • Uploading pics on facebook

    I keep getting a message that says upload failed what can i do to fix this

  • IPod mini is very sick, please help

    Problem: When my mini is fully charged (8 hrs) and updated, I can listen to about one or two songs (all songs are playable at this point). After a song or two, the battery icon drains completely and the screen says "low battery". The iPod then turns