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;

Similar Messages

  • 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

  • Interactive Report with specific rows editable

    I have an interactive reports, with the edit (pencil) link to a maintenance form. I only want the link to show for specific records in the reports. Can you put a condition in the link column to the pencil for certain records?
    If so, how can you access the value of the field? ie. I need to check the value of 'USER_NAME' in the select below against :APP_USER
    select A.pk_id as "PK_ID",
    A.fk_sis_user as "FK_SIS_USER",
    A.list_name as "LIST_NAME",
    A.list_description as "LIST_DESCRIPTION",
    B.user_name as "USER_NAME",
    A.creation_date as "CREATION_DATE"

    Not exactly what you are asking for, but it may give you an idea hot to create conditional
    icon and link.
    From always excellent examples from Denes Kubicek:
    http://apex.oracle.com/pls/otn/f?p=31517:23:3086073313243153::NO
    HTH
    Thomas

  • With holding tax report with material and qty fields

    Dear All,
    Is there any standard report available with with holding tax data with material and qty fields.
    Thanks,
    Sekhar.

    dear Friend,
    Withholding tax will deduct on services. Hence Material and quantity is not relavent.
    There is no report is available also.
    reg
    Madhu M

  • 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 ;-)

  • Interactive reports with alv

    Hi,
    i just wanted to know how to create interactive reports with check box and whether we can use av with interactive reports.

    hi,
    this the code for interactiv ALV
    *& Report  ZINT_ALV
    REPORT  zint_alv.
    TYPE-POOLS:slis.
    TABLES:mara,
           makt,
           mseg.
    DATA:BEGIN OF itab OCCURS 0,
          matnr LIKE mara-matnr,
          maktx LIKE makt-maktx,
         END OF itab.
    DATA:BEGIN OF itab1 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          menge LIKE mseg-menge,
          meins LIKE mseg-meins,
          werks LIKE mseg-werks,
         END OF itab1.
    DATA:BEGIN OF itab2 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          budat LIKE mkpf-budat,
         END OF itab2.
    DATA:fcat TYPE slis_t_fieldcat_alv,
         fcat1 TYPE slis_t_fieldcat_alv,
         fcat2 TYPE slis_t_fieldcat_alv,
         eve TYPE slis_t_event,
         eve1 TYPE slis_t_event.
    DATA:t_mat LIKE mara-matnr,
         t_doc LIKE mseg-mblnr,
         s_mat LIKE mara-matnr,
         g_repid LIKE sy-repid,
         subtot TYPE slis_t_sortinfo_alv,
         g_subtot LIKE LINE OF subtot.
    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:mat FOR mara-matnr OBLIGATORY.
    SELECTION-SCREEN:END OF BLOCK blk1.
    INITIALIZATION.
      PERFORM build_fcat USING fcat.
      PERFORM build_eve.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  build_fcat
          text
         -->T_FCAT     text
    FORM build_fcat USING t_fcat TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat TYPE slis_fieldcat_alv.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-ref_fieldname = 'MATNR'.
      wa_fcat-ref_tabname = 'MARA'.
      wa_fcat-seltext_m = 'Material'.
    wa_fcat-input = ' '.
    wa_fcat-edit = 'X'.
      wa_fcat-input = 'X'.
    wa_fcat-key = 'X'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MAKTX'.
      wa_fcat-seltext_m = 'Description'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
    ENDFORM.                    "build_fcat
    *&      Form  build_eve
          text
    FORM build_eve.
      DATA:t_eve TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = eve
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "build_eve
    *&      Form  get_data
          text
    FORM get_data.
      SELECT maramatnr maktmaktx INTO CORRESPONDING FIELDS OF TABLE itab
      FROM mara INNER JOIN makt
      ON maramatnr = maktmatnr
      WHERE mara~matnr IN mat.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid         "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND'
         i_grid_title                      = 'Interactive ALV'
         it_fieldcat                       = fcat
         it_events                         = eve
        TABLES
          t_outtab                          = itab
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "dis_data
    *&      Form  user_command
          text
         -->U_COM      text
    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
      CLEAR fcat1.
      CASE u_com.
        WHEN '&IC1'.
          READ TABLE itab INDEX sel_field-tabindex.
          IF sel_field-fieldname = 'MATNR'.
            IF sy-subrc = 0.
              t_mat = itab-matnr.
              PERFORM build_cat1 USING fcat1.
              PERFORM build_eve1.
              PERFORM get_data1.
              PERFORM dis_data1.
            ENDIF.
          ENDIF.
         SET PARAMETER ID 'MAT' FIELD t_mat.
         CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_fcat1
          text
         -->T_FCAT1    text
    FORM build_cat1 USING t_fcat1 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat1 TYPE slis_fieldcat_alv.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MBLNR'.
      wa_fcat1-seltext_m = 'Material Doc.'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MENGE'.
      wa_fcat1-seltext_m = 'Quantity'.
      wa_fcat1-do_sum    = 'X'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MEINS'.
      wa_fcat1-seltext_m = 'UOM'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'WERKS'.
      wa_fcat1-seltext_m = 'Plant'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
    g_subtot-spos = 1.
    g_subtot-fieldname = 'MBLNR'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    g_subtot-spos = 2.
    g_subtot-fieldname = 'MENGE'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    ENDFORM.                    "build_fcat1
    *&      Form  build_eve1
          text
    FORM build_eve1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = eve1
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "build_eve1
    *&      Form  get_data1
          text
    FORM get_data1.
      SELECT mblnr menge meins werks FROM mseg
      INTO CORRESPONDING FIELDS OF TABLE itab1
      WHERE matnr = t_mat.
    ENDFORM.                                                    "get_data1
    *&      Form  dis_data1
          text
    FORM dis_data1.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND1'
         it_fieldcat                       = fcat1
         it_events                         = eve1
         i_save                            = 'A'
         it_sort                            = subtot
        TABLES
          t_outtab                          = itab1
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "dis_data1
    *&      Form  user_command1
          text
         -->U_COM1     text
         -->SEL_FIELD  text
    FORM user_command1 USING u_com1 LIKE sy-ucomm sel_field TYPE slis_selfield.
      CASE u_com1.
        WHEN '&IC1'.
          READ TABLE itab1 INDEX sel_field-tabindex.
          IF sy-subrc = 0.
            t_doc = itab1-mblnr.
            PERFORM build_cat2 USING fcat2.
            PERFORM get_data2.
            PERFORM dis_data2.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_cat2
          text
         -->P_FCAT1  text
    FORM build_cat2  USING    t_fcat2 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat2 TYPE slis_fieldcat_alv.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'MBLNR'.
      wa_fcat2-seltext_m = 'Material Doc.'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'BUDAT'.
      wa_fcat2-seltext_m = 'Material Date'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
    ENDFORM.                    " build_cat2
    *&      Form  get_data2
          text
    -->  p1        text
    <--  p2        text
    FORM get_data2 .
      SELECT mblnr budat  FROM mkpf
        INTO CORRESPONDING FIELDS OF TABLE itab2
        WHERE mblnr = t_doc.
    ENDFORM.                                                    " get_data2
    *&      Form  dis_data2
          text
    -->  p1        text
    <--  p2        text
    FORM dis_data2 .
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         it_fieldcat                       = fcat2
         i_save                            = 'A'
        TABLES
          t_outtab                          = itab2
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    " dis_data2
    reward if useful...

  • 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

  • Interactive Report Sub-total and total

    Hi friends,
    I have an employee interactive report with group by job name and also showing the salary sub-total for each and every job(group by).
    I have an requirement like to highlight the sub-total for each and every job with a background color so that the user can identify the sub-total with the color, and also whether it is possible to display an overall total @ last in the report with a label named "Total Salary" in which it calculates the overall salary is also to be highlightened with the background color.
    Also is it possible to display a text "Sub-total" besides each and every salary sub-total  of job(group by). Currently if we display a sum for the salary then im getting the total's but with out a text named total.
    Since i can see the highlighted feature in interactive report but im not sure how to apply it for the sub-total and total column.
    I have reproduced the example in apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    In the application 9494 named "test" in page1.
    Thanks in advance.
    Brgds,
    Mini

    Hi, Mini,
    style=background-color:red;
    But that Total region color dint change.The code for style should be in "Form HTML Element Attributes". However, this changes the background color only for the Total value not for the whole row.
    If you want to change for the whole row, you need to change the template that is selected for the region.
    I changed the region template in your application to "Borderless Region" and made the changes to the "Borderless Region" template, it now shows the background color for Total Value.
    <table class="t20Region t20Borderless #REGION_CSS_CLASSES#" id="#REGION_STATIC_ID#" border="0" cellpadding="0" cellspacing="0" summary="" #REGION_ATTRIBUTES#>
    <thead><tr><th class="t20RegionHeader" id="#REGION_STATIC_ID#_header">#TITLE#</th></tr></thead>
    <tbody id="#REGION_STATIC_ID#_body">
    <tr><td class="t20ButtonHolder">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>
    </tbody>
    </table>The below does the trick. :)
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>Note: I made the changes to "Borderless Template", but you can copy the template to your own and apply this change.
    Regards,
    Natarajan

  • Interactive Report with Null Columns

    I've got a user who wants to export an interactive report, and he needs certain columns to appear on the export for him to fill the data in later (this is an intermediate step, while we work on getting all the data he needs in to the database). I've created the report query, and there are a handful of null/empty columns (to preserve the correct order for the export). When I try to add this query to APEX in an interactive report, I get a "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.
    Googling around shows me that this happens because of similarly-named columns, and the solution is to provide aliases to all columns. My report has aliases on all columns, but I still cannot create an interactive report. I've tried changing the null columns to empty strings, as well as enclosing the aliases in double-quotes, but nothing works. I can however use my original query to create a standard report, but due to the export requirement, this isn't ideal.
    I was able to create the interactive report with one null column, and then edited the report source to add in the others. This had to be done one at a time, since trying to add multiple null columns at the same time gives the same error again. Unfortunately, when I try and run the page, I get an "ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined" error.
    My original query:
    select customer.customer_name as customer,
           project.name as project_name,       
           trunc(project.estimated_end_dt) as due_date,
           project_status.project_status_desc as status,
           null as revenue,
           project.baseline_effort as baseline_hours,
           null as projected_cost,
           null as est_gain_loss,
           project.actual_hours as actual_hours,
           project.estimated_hours as projected_hours,
           null as projected_cost,
           null as projected_gain_loss,
           null as roi      
        from project,
             customer
      where customer.customer_id = project.customer_id
      and project.inactive_ind = 0
      and project.customer_id is not null
      and project.estimated_end_dt >= :DTP_P50_STARTDT
      and project.estimated_end_dt <= :DTP_P50_ENDDT
    order by customer.customer_name,
             project.estimated_end_dt;             Can someone tell me a way to create an interactive report with multiple null columns?

    Hi shimmoril,
    The problem is likely that you have two columns aliased as "projected_cost" (7th column and 11th column).
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • Interactive Report with union all in the query

    I have an interactive report with the following query in the report region:
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries;
    This gets translated as listed below during runtime. I am trying to pass a value to both SELECT statements instead of the just the bottom select statement. Is this possible using interactive reports.
    select
    PROPERTY,
    SADDR1,
    UPOSTDATE,
    SOTHERDATE1,
    ACCOUNT,
    SDESC,
    UREF,
    SUSERDEFINED1,
    TRANS_NOTES,
    SAMOUNT,
    DETAIL_NOTES,
    "JOURNAL_CONTROL-1000000000" "JOURNAL_CONTROL-1000000000"
    from (
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    ) r
    where ("PROPERTY" = :APXWS_EXPR_1)
    0.14: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="prop1"
    Thanks for any help,
    Jim

    The bottom query is actually the third query, it encompasses the two that are unioned. It is generated by APEX to allow for the search facility - to achieve what you want ignore the larger query, and get your query working in something like SQL developer. Once it's working then put it into APEX, and the search wrapper will be generated.
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    where property = :YOUR_CRITERIA
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    where property = :YOUR_CRITERIA;
    Then you need to think about how you are using the report, if it is linked to from another report, then create a hidden variable and pass it from the parent.
    If the report is standalone , then you could create an item , that can be edited and when submitted, re-executes the report based on the criteria entered.
    Steve
    Hot and bothered in sunny Dubai

  • 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

  • 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

  • Can i have a sample BSP INTERACTIVE Reports with step by step.

    Hi Friends,
    Can i have a sample BSP INTERACTIVE Reports with step by step.
    Moosa

    Hello,
    Please find the sample Code below.
    FIRST PAGE
    Layout Code.
    <htmlb:label for="emp" text="Employee id" width="10"/>
          <htmlb:inputField id="emp"  value="<%= w_input1%>"/>
          <p>
    <htmlb:label for="Employee Details"/>
           <htmlb:button   id = 'get'
                           text = 'Display'
                           on Click = 'OnInput Processing' />   <p>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= ZTABLE%>"  <- Give the table name
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    ONINITILIZATION EVENT.
    data:
      fs_yhtable like line of TABLE.
        select * from yhtable into table ZTABLE.
    ONINPUT PROCESSING CODE:
    * event handler for checking and processing user input and
    * for defining navigation
    class cl_htmlb_manager definition load.
    case event_id.
      when cl_htmlb_manager=>event_id.
      data: event  type ref to if_htmlb_data,
            fs_yhtable like line of t_yh1205,
            selrow type ref to cl_htmlb_tableview.
      event = cl_htmlb_manager=>get_event_ex( request ).
      selrow ?= cl_htmlb_manager=>get_data( request = request
                                            name    = 'tableView'
                                            id      = 'Employee' ).
      data: tv_data type ref to cl_htmlb_event_tableview,
             t_tab type int4_table.
    *        tv_data1 type ref to cl_htmlb_event_tableview.
      tv_data = selrow->data.
       t_tab = selrow->selectedrowindextable.
      if  event is not initial
      and event->event_name = 'tableView'.
        w_int = tv_data->rowselection.
        navigation->set_parameter( 'Employee' ).
        navigation->set_parameter( name = 'w_int'
                                   value = w_int ).
        navigation->set_parameter( name = 'table'
                                   value = table ).
        navigation->goto_page( 'second.htm' ).
      endif.
    endcase.
    SECOND PAGE CODE:
    LAYOUT CODE:-
    <htmlb:content design="design2003">
      <htmlb:page title = "Employee Details">
        <htmlb:form>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= t_yh1205%>"
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    </htmlb:tableView>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Hope this is helpful.Let me know if you need any more help.
    Thanks
    kalyan

  • CFMAIL and Editing Fields

    Hi all,
    I need to allow a user to fill out some forms with the
    following info: Name, Title, Supervisor, Division, Status, Salary,
    Effective Date and Remarks. After filling out the info, it needs to
    be sent via a link that will allow the recipient access to the
    table to edit if necessary. Then the recipient can 'Approve' or
    'Deny' the information and send it back for review and distribution
    by the original sender.
    The forms are already complete but I'm confused as to how the
    emailing and editable fields will work. I already have a CFMAIL
    page completed that used to display the information once it was
    input then simply mail it to the recipient. Well, now, the user
    wants the ability to have the recipient edit the information then
    email it back so that they can distribute it. So now I have to use
    a DB table, whereas before, it was just being sent as an email. So
    I've created the table with the columns for the info I mentioned
    before. What I'm confused with is how to make the transfer from
    just emailing information, to emailing a link that will allow the
    recipient to access the table, edit it if necessary, then Approve
    or Deny it and send it back in the same format. The Approval can
    simply be in the form of a field.
    So I basically need to make it so that I'm taking this and
    making it into an editable table via a link sent though an email
    after the user has filled out the necessary information in the
    forms before. Sorry for all the explaining and confusion. I've
    attached some code to look at and modify. I can provide more code
    from the form input pages if you'd like though I figured the logic
    of the email and the ability to allow the recipient to update the
    DB then actually send it back is in the page I attached. It's
    probably not as bad as it looks or sounds but it's confusing the
    hell out of me...
    Thanks a ton,
    Eric

    I have never used REUSE_ALV_GRID_DISPLAY function module for such scenario but i have used OO ALV to get data realtime.
    CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
           EXPORTING
             IS_LAYOUT        = GS_LAYOUT
             IS_VARIANT       = GS_VARIANT
             I_SAVE           = X_SAVE
             IT_TOOLBAR_EXCLUDING = TEMP_UI
           CHANGING
             IT_FIELDCATALOG  = ITAB_FIELDCAT[]
             IT_OUTTAB        = I_ORDER[]
             IT_SORT          = I_SORT[]."
    I display ALV using above statement and whenever user clicks some button on the container, i use
    "* refresh screen display with new data.
      CALL METHOD GRID1->REFRESH_TABLE_DISPLAY.
    method to get new data populated into internal table after this statement.

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • Thumbnail Images Too Small

    I'm having a very big problem with my new iMac. The problem is the size of the thumbnails when opening a photo from an external program or uploading to a website. This is not a problem when browsing photos with the Finder. In the Finder, I see the li

  • How to set a default value of " " for a VARCHAR2 in ER diagram?

    Hi, I am trying to set the default value of a VARCHAR2 attribute to " " (space) in an ER diagram. But it just thinks I don't want anything for the default value. If I specify CHR(32) will it work? or is there another way? Will I have to wait until I

  • EasySign: Can I or can't I modify filled fields?!

    Is it just me, or is Acrobat EchoSign a user-hostile piece of garbage? I am using Reader 10.1.3. Below is a form I'd love to fill out and perhaps "sign" with a TIFF of my signature, but first I have to type in some fields. Getting to this point took

  • Can i connect my apple magic mouse and my apple wireless keybord with my pc?

    can i connect my apple magic mouse and my apple wireless keybord with my pc?

  • Please help... this is kind of urgent!

    Hello, I have to create a product class that holds the item number, product name, units in stock, and the unit price. I also have to create a java application that displays the same info. I have been working on this for three days now... I am getting