Selecting a set of rows in an Interactive Report

Hi,
What I want to achieve is when a row is clicked in an interactive report that row (via a Primary Key/ROWID) is added to a list of IDs to be edited in one go, I will probably use a collection for this, although a colon delimited list might be quicker and/or easier. The two ways I thought of trying to achieve this was by bending the use of the Link Column and providing a Link to Custom Target or using a row selection technique described below.
My initial thought was to make it a check box which then called some JavaScript/On demand process, similar to the one shown here. So far I've tricked it by making the image my check box and the link attributes being my function which returns false to stop the page redirecting when clicked. The problem is I can't seem to get the ROWID to appear, I've tried #ROWID# which simply puts that string as the input, so for example, my "image" is this: <input type="checkbox" value="#PK_ID#" name="f01"/>So, if I could get something meaningful in there instead of ROWID it would work a treat I think.
The alternative method was to use a form of the row highlighting described in this Row Highlighting. The problem here seems to be that for an Interactive Report you cannot change the table row elements to add the onclick. Also when trying this (using Firefox to add the appropriate code to a TR element) it works, as in the function fires, but does not change the appearance of the rows. I lack the CSS/HTML skills to work out why so far.
Worst case I can simply create a checkbox field in the query as per the example above, the only drawback is that the column might not always be available in the report if the user has hidden the column.
Any ideas?
Many thanks,
Gareth.
Edited by: gaz_stephens on Jan 16, 2009 12:09 PM

Hi,
If all of the records are displayed on the report in one go (that is, there is no pagination involved), then you can add the onclick after the table has been created. Add the following into the report's Region Footer setting:
&lt;script type="text/javascript"&gt;
function addEvents()
var t = document.getElementById(gTable);
var tRows = t.rows;
var k;
for (k = 1; k &lt; tRows.length; k++)
  tRows[k].onclick = function() {alert('Here');};
addEvents();
&lt;/script&gt;If pagination is involved, then any javascript will not be run when the next page is displayed. The alert('Here'); in the code would need to be replaced with some javascript functionality - probably calling a javascript function that works on the TR's "this" object reference.
Andy

Similar Messages

  • Dynamically set maximum row count in Interactive Report

    Hi,
    Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
    Thanks,
    Mike

    Hi Mike,
    You can do that with javascript
    gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
    any number means any number but not higher than the number you set at Maximum Rows Per Page.
    You probably can mix the solution from Martin and the above code.
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
    Edited by: kvlek on 24-apr-2013 12:29
    Edited by: kvlek on 24-apr-2013 12:35

  • Adding radio button to each row of an interactive report: possible or not?

    First of all let me explain what the point of this application is.
    I'm making an application that allows a user to select something out of a drop-down select list. This list is a list of categories for food. Let's say the user selects "Fruit".
    Then the page refreshes and shows an interactive report with a list of food that belongs to the category of fruit.
    Here's where I want to change things:
    I want the user to see the interactive report, but in this interactive report I want to add a radio button for each row.
    Then, when a certain type of food is selected (let's say "Strawberry") via the radio button, a text field should appear underneath the interactive report. In this textfield, the user can then add the weight of the food item, and then it will calculate how many carbs there are in the strawberry.
    All I really want to know is:*
    How do I add a radio button to each row of the interactive report, and how do I link this radio button to the value of that particular row?*
    Additional information:
    The item "P17_FOOD_CATEGORY" contains the following LOV:
    select FOODCATEGORYNAME as display_value, FOODCATEGORYID as return_value
    from FOODCATEGORY
    order by 1
    The "Food" region contains the following source:
    select a.FOODID, a.NAME, b.FOODCATEGORYNAME, c.STANDARDAMOUNT, c.NAME Unit
    from FOOD a inner join FOODCATEGORY b
    on a.FOODCATEGORYID = b.FOODCATEGORYID join FOODUNIT c
    on a.FOODID = c.FOODID
    where a.FOODCATEGORYID = :P17_SET_CATEGORY
    EDIT:
    PLEASE! Even if you don't know a good answer or if you are unsure about your answer, do post! Even suggestions would be welcome! I really need all the help I could get, even if it's not much.
    Edited by: 917169 on Feb 29, 2012 12:25 AM

    Hi there!
    I tried to change my code to your version, but then I get an error message:
    Error Unable to change Interactive Report query.
    ORA-12899: value too large for column "APEX_040100"."WWV_FLOW_WORKSHEET_COLUMNS"."DB_COLUMN_NAME" (actual: 32, maximum: 30)
    I don't quite know what this means. After doing a quick search on the internet, I know that this message should mean that the length of the value for the columns named "APEX_040100", "WWV_FLOW_WORKSHEET_COLUMNS" and "DB_COLUMN_NAME" is too long. But, I don't have these columns. I searched for them in my object browser, and they can't be found in any table related to my application.
    I'm sure your answer is the solution, but do you perhaps have an idea on how to solve this error? I checked the allowed maximum length for any column value that is related to my application, but they all have "50" set as the maximum value...
    Thank you for your reply. ;)

  • Freezing columns and rows in an Interactive Report

    version 3.2.1
    Hello,
    How can I freeze columns and/or rows in an Interactive Report so they don't scroll off the screen?
    Thanks,
    Joe

    In the header html, enter the following
    freeze(rownum=>1,degree=-100,scale=centigrade);

  • Automatically delete row data on interactive report

    Hi All,
    I would like to know it's possible to automatically delete row data on interactive report when the check box is checked.
    I'm appreciating if you all can share your opinion or solution.
    Thanks a lot in advance!
    Best regards,
    Liz

    Hi,
    Why you like have checkbox ?
    Is it more clear for user have image/button like my example ?
    This is just example you need modify according your needs. Example do not have confirmation dialog.
    Page HTML header
    <script>
    function delIRRow(p_pk_val){
    var a = new htmldb_Get(null,null,'APPLICATION_PROCESS=DELETE_ROW');
    a.addParam('x01',p_pk_val);
    var r=a.get();
    if(!r=='1'){alert('Delete operation failed!');}else{gReport.search('SEARCH');}
    </script>On Demand process DELETE_ROW
    BEGIN
    delete from your_table where pk_col = APEX_APPLICATION.G_x01;
    htp.p('1');
    EXCEPTION WHEN OTHERS THEN
    htp.p('0');
    END;Change your_table and pk_col according your table name and pk column name.
    Call javascript from image/button (IR column link) or checkbox, and send primary key value as parametter
    Br,Jari
    Edited by: jarola on Jul 5, 2010 11:58 AM

  • How to set row height of the row in the interactive report?

    Some of the values in the columns of my interactive report are wrapped up changing the height of the row to 2 or 3 characters.
    Is there any way to change it? I would like to have all rows set to 2 characters height.
    Robert

    Add the following style sheet to the page HTML Header.
    <style>
    table.apexir_WORKSHEET_DATA td {
      height: 2.8em;
    </style>

  • Setting default columns displayed in interactive report

    Hi APEX community,
    I recently created an interactive report based on an sql query as follows:
    select
    "STOCK_CLIP_ID",
    "TITLE"
    from "STOCK_CLIP"
    After creating the report I added an additional column:
    select
    "STOCK_CLIP_ID",
    "TITLE",
    *"UPLOADED"*
    from "STOCK_CLIP"
    The new column does not display by default, I have to add it under Actions > Select Columns. I cant find any setting to add my new column UPLOADED to the default columns to be displayed so that when a user first navigates to the report they dont have to add that column in order to be able to see it.
    Sorry this is perhaps a stupid question with an obvious answer, i'm new to the interactive reports.
    Thanks!

    Hi,
    Login to Apex builder. Run page where is your interactive report.
    Select columns you like to show default from Action menu. Save report default layout from Action menu.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Link to other pages of rows in APEX Interactive Report

    In my Interactive Report I would like to add a way to click on page results other than just clicking the > to advance to the next set of results.  I have my rows per page set to 15 by default and would like to keep it that way, but want a way to add links to page 4 or page 5 or page 10 as well.  Has anyone done that before, and if so ideas would be greatly appreciated.  I need to keep my rows per page to 15 because of parameters I send to another page, so increasing the rows per page is not an option. Thanks.

    Hi,
    The next button in your pagination fires a javascript function:
    gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')
    You can create a page button or link containing that javascript function. Replace the number 16 by the rownumber you want to start your result set.
    Kind regards,
    Vincent Deelen

  • Total Rows returned in interactive report

    Hi
    I have an interactive report that displays a warning message if more than 200 rows are returned. Is there anything within APEX that tells me the exact number of rows returned in my report, or at the very least if my report has exceeded my 200 row limit?
    I have a button on my page that I only want to display if the number of rows returned in my query is <= 200.
    I know that I could use say NDS to execute my select statement in order to determine the number of rows as a seperate statement - but this seems a bit of over-kill.
    Many thanks
    Paul

    M Tajuddin wrote:
    Hi Paul,
    You can change the this from report attributes. Click on Edit page >> click on the Interactive report >> click on Report Attributes on the top >> down the bottom there is an option where you can change the row numbers and error message etc.
    Hope this helps,
    M Tajuddin
    http://tajuddin.whitepagesbd.com
    Hi
    I dont want to modify the number of rows returned. I just want to know how many rows are returned so that I can display or hide a button.
    Thanks
    Paul

  • Row filter on Interactive Report via URL parameter

    Hi,
    I've searched the forum but can't find a concise answer.
    Is it possible to pass a parameter (p_X) from one page to another via the url and then use p_X to act as a row filter in an Interactive report?
    Thanks for the help
    Joel

    Joel -
    Read the link that Andy posted. It is a pretty good source. This topic is not really that difficult to do. I have done it several times. Make sure that you understand the URL syntax for APEX. If you need a refresher on this take a look at http://www.oracleapplicationexpress.com/tutorials/55
    Austin

  • How to edit "Single Row View" in Interactive Reports?

    Hi,
    When using Interactive Report when one clicks on the little page icon on the left on a gievn row - one is presented with a small output from all columns for that row.
    For example login as demo/demo to:
    http://apex.oracle.com/pls/apex/f?p=12988:1
    And click on the first icon in the first row. You'll get an output like:
    Empno     7839
    Ename     KING
    Job     PRESIDENT
    Mgr     -
    Hiredate     17-NOV-81
    Sal     5000
    Comm     -
    Deptno     10
    How (and where) can I modify the output of this?
    Regards,
    Pawel.

    Thanks, for your responses.
    In fact this is what I have done. What I am looking after is simply how to modify what is already there. That way, I don't need to create different pages with Next/Previous buttons etc... for every Interactive Report I have.

  • Set default search column in Interactive Report

    Hi All:
    In APEX 4.0, for "Interactive Report" search function:
    If user doesn't select a column name to search for (this is done by click Magnifier glass icon), the IR will search "All Columns" that contains a string you have typed in the search bar.
    Is there a way to configure IR so that, by default, it will not search "All Columns", instead, it should search a particular column that I will specify when define this IR report.
    Why I am asking this? Here is my case:
    I have created a IR report to search employee information. By default, when user enters a string in the search bar, user want to search "Emploee Full Name" column in my IR report. User wants this default search behavior and really doesn't want to "click Magnifier glass icon and select "Employee Full Name" column; then type the search string).
    Basically, in my case, the IR report should default to search "Employee Full Name" if user doesn't select any search column.
    Any idea how to achieve this?
    Thanks!
    Kevin

    In the above DA, Changing the 'Event Scope' to 'Dynamic' should trigger it after PPR. I tried it but it's not working for me.
    Try the below it's working for me as expected,
    Create DA like below,
    Event: After Refresh
    Selection Type: Region
    Region: Select your IR region
    In True Action,
    Action: Execute Javascript Code
    Code:
    $s('apexir_SEARCH_COLUMN_DROP','COLUMN_LABEL');                           
    $s('apexir_CURRENT_SEARCH_COLUMN', 'COLUMN_ALIAS');
    In Affected Element,
    Selection Type: Region
    Region: Select your IR region
    Event Scope: bind (Default)
    Make sure Fire On Page Load under 'Execution Option' is checked. (i.e. Fire On Page Load: Yes)
    I am using APEX 4.0.2.00.07. It's working for me also in apex.oracle.come it's working in my example application.
    Thanks
    Lakshmi

  • Set header at runtime on Interactive Report

    I have an interactive report that displays twelve months across the report. The user can then choose a start year and month for the first column of the report. So, at runtime, I would like to populate the header with the appropriate year/month.
    On a regular report region, you can set the header using a Function returning colon delimited headings. I do not see this functionality on the interactive report. Am I overlooking something or is there another method where I can set the headers for these columns at runtime?
    Thanks,

    Andy,
    Thanks for the info. Unfortunately, I am having trouble implementing. When I place &P1_MONTH1. in my header, my header displays &P1_MONTH1. Hopefully, I am just implementing incorrectly. I am opening the Interactive Report and just entering &P1_MONTH1. in the Heading column for the appropriate column. Is this correct?
    NOTE: I placed the &P1_MONTH1. on a SQL Report and it worked. However, when trying to use on an Interactive Report it does not.
    Thanks,
    Edited by: Brian H on Feb 18, 2009 9:40 AM

  • Set image size in an Interactive Report

    Hello,
    I am running APEX 4.1 on Oracle 11g.  I am trying to resize images in either an IR or a classic report to be 100px x 100px.  The images are of various sizes, but all larger than the size I want to display.  The images are stored as.jpg images, and I need to access them via URL.  I have this in my select statement:  '<img src=https://aaa.bbbbb.edu:10056/inbpics/' || 'I00' || substr(spriden_id,5,5)|| '.JPG>' pic and it works to display the image, but it displays the image at its full size.  I try adding height and width values to the query, like: '<img src=https://rand.wvnet.edu:10056/inbpics/' || 'I00' || substr(spriden_id,5,5)|| '.JPG height=100 width=100>' pic but the image doesn't display because it adds the height=100 to the end of the path for the image.
    I know I could create thumbnails of the images, but there are several thousand images with more being added constantly, and it would be too much work to try to keep up with.
    Is there a way to set the height and width of an image in a report?
    Thanks,
    Bob

    Hello,
    Change your query to include "class" for images.
    '<img class="img100-100" src=https://aaa.bbbbb.edu:10056/inbpics/' || 'I00' || substr(spriden_id,5,5)|| '.JPG>'
    Now put following CSS in Page HTML Header or Footer.
    <style>img.img100-100 {height: 100px; width: 100px;}</style>
    Regards,
    Hari

  • Push button "Select Block" on the list screen?Interactive report

    Hi, i am developing a plain report(Use read data & write output, not ALV).
    And there was a checkbox(itab-chx) before each line of the output list.
    The customer wants me to add 4 buttons on the menu bar, they are 'Delete', 'Select ALL', 'Deselect all',  <b>'Select block'</b>.
    As far as i know that 'Delete' button is for the user to delete the entries which they have checked using the checkbox.
    As for 'Select ALL' is that when they push this button, all the checkbox on the output list are checked.
    As for 'Deselect all' is that ...all are unchecked.
    <b>BUT</b> i dont have any idea on 'Select Block' function?? What it is and how to program and handling with this button???
    Below is my code for those button, just dont know what 'Select block' means
    at user-command.
      case sy-ucomm.
        when 'DLT'. 'Delete
             'Do delete things...
        when 'SLL'. 'Select all     
          loop at itab.
            itab-chx = 'X'.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'DSL'. 'Deselect all
          loop at itab.
            itab-chx = ' '.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'SBL'.  'Select block
          '???? No idea at all!!!
      endcase.
    Great thanks!!! Any helps?
    Hoo lala 
    Message was edited by:
            Hoo lala
    Message was edited by:
            Hoo lala

    Refer this demo report, it is having 2 buttons one Call (defined in PF status) and other one PA30 one.
    u have to create a PF status, and there in Application Toolbar option i have cretaed a button Named Call. like tht u can create more buttons as per ur requirement.
    REPORT  ZGILL_CALLREPORT                        .
    DATA: L_PERNR(20).
    parameters : p_rname(20) obligatory DEFAULT 'NONE'.
    INCLUDE <icon> .
    selection-screen pushbutton 60(20) gocfg user-command amit.
    AT SELECTION-SCREEN OUTPUT.
    write icon_configuration as icon to gocfg.
    concatenate gocfg 'Go to PA30' into gocfg.
    AT SELECTION-SCREEN.
    if sy-ucomm = 'AMIT'.
    SET PARAMETER ID 'PER' FIELD '10000000'.
    call transaction 'PA30'.
    ENDIF.
    Start-of-selection.
    write: 'This Report is called by report',' ',p_rname left-justified.
    set pf-status 'TEST'.
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'CALL'.
    submit zgill_it using selection-set 'TESTING_IT'
           exporting list to memory and return.
    perform get_output.
    WHEN '&F03'.
      LEAVE SCREEN.
    WHEN '&F15'.
      LEAVE PROGRAM.
    ENDCASE.
    *&      Form  get_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form get_output .
    data : listobject like abaplist occurs 0.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject       = listobject
    * EXCEPTIONS
    *   NOT_FOUND        = 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.
    CALL FUNCTION 'DISPLAY_LIST'
    * EXPORTING
    *   FULLSCREEN                  =
    *   CALLER_HANDLES_EVENTS       =
    *   STARTING_X                  = 10
    *   STARTING_Y                  = 10
    *   ENDING_X                    = 60
    *   ENDING_Y                    = 20
    * IMPORTING
    *   USER_COMMAND                =
      TABLES
        listobject                  = listobject
    * EXCEPTIONS
    *   EMPTY_LIST                  = 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.
    refresh listobject.
    endform.                    " get_output

Maybe you are looking for

  • Decode statement in Select line of a View Object Query

    I attempted to create a view object in expert mode with a customized query. The query had a decode statement in the select line of the query. The view object compiled correctly but gave an error when run. ex: select .... decode(CrpSchools.SCHOOLS_ID,

  • Is it possible to trap the user's COMMIT and do something?

    I need to do some actions when a user (actually a program that I can't access) performs COMMIT and close the session. My functionality is activated from triggers. I keep many variable in package. Before a session ends I need to do some final steps us

  • DVD Drive problem

    Is it just me or are people having a lot of problems with there DVD Drives. I had mine replaced back in April, barely used the drive, went to use it tonight and its ejecting discs again. Surely it can't be gone again. Can anyone give me any ideas at

  • Playing sound on iPhone

    Hi guys, I'm trying to play sounds on iPhone but when I installed my IPA, no sounds are playing. Does the Packager for iPhone already support playing sounds? Cheers, Anthony

  • Native Fingerprint Reader Single-Swipe

    Hey all- I'm running Windows 7 on my Thinkpad T400s, which has a great Thinkvantage feature: I can swipe my finger to turn on the computer (or wake it from sleep) AND log in to Windows with that same swipe. Since the Thinkvantage software takes a few