Button on Interactive Report to fire a process using JavaScript

I have a requirement to trigger a process from a button on an interactive report. One of the report columns has the triggering data allowed to make the process fire. The requirement is that the button says different things based on the value from another column in report.
My button is an html button that when the process is allowed to run, is enabled and fires a javascript function. When the process is not allowed to run for the row where the button is placed, the button changes text, color and is disabled.
The switching of the HTML button is working properly. The problem is that I am not able to grab the column value from the report to submit with the onclick() event.
As best I can tell, there is not unique id tag on the report columns and the best that I am able to do is to apply one class to the button and another class to the column that contains the value that needs to be submitted on my onclick() event.
I have considered using a link column that does a submit to a URL passing in the desired value but I would lose control of the appearance of my button.
Does anyone have a suggestion?
Thanks

In debugging while clicking on back button for first time, I found that after 'Leave to screen 0' statement debugger goes to double click event of screen 100 and start processing from a statment written immediately after 'Call screen 200' statement.
Yes, that's right. The processing will be continued from next stamtement after CALL SCREEN 200. But after the PAI will finish it shoud go to NEXT SCREEN which is 0.
If that doens't work you can try leaving the screen 100 explicitly as well.
   CALL SCREEN 200. 
   LEAVE TO SCREEN 0.  "the processing will terminate screen 100 as well
Try it out.
Regards
Marcin

Similar Messages

  • Button in Interactive Report

    Hi Friends,
    I want to add Button in Interactive report for each row. Is it possible to add a button.Please help me.

    You should add a dummy column in your report query. Make dummy column as a link and change the column attribute 'Column Link' to and image. For instance the Edit column in the following query is a button on my report.
    select
    'Edit',
    "CUST_NO",
    "CUST_FIRST_NAME",
    "CUST_LAST_NAME",
    "CUST_ADDRESS",
    "CUST_CONTACT_PHONE_NO"
    from "CUSTOMER"

  • Control the *GO* button in interactive report

    How to control the GO button in interactive report using dynamic action?
    i have to press the GO button automatically using dynamic action when page item get focused.
    Is it possible?
    thanks and regard,
    skud.

    Hi skud,
    Your dynamic action can capture the "Get Focus" event of your page item and then you could try creating a true action to submit the page with a specific request. Create a branch to a URL with the condition of request being equal to the one you specified before, and as target select URL and make use of the filtering of an IR by URL when linking. This is just an idea, hope you can get the result you need.
    Regards,
    Sergio

  • Radio buttons on interactive report

    Hello all,
    I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
    Thanks.

    Hi inka,
    inka wrote:
    Hello all,
    I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
    Thanks.
    one of the way to submit the form is use apex.submit
    Check the example given below
    1) Assuming you have used apex_item.radiogroup to create radio buttons.
    sample sql query for interactive report
    select EMPNO,
          ENAME,
          JOB,
          MGR,
          HIREDATE,
          SAL,
          COMM,
          DEPTNO,
          apex_item.radiogroup(1, EMPNO) r
      from EMP
    2) Go to Report Attributes -> Edit Radio button column
        Under Column Definition
        Display Type : Standard Report Column
        Under Column link -> do the changes given below
        Link Text : #R#  // here R is my radio button column name, so select yours radio button column name.
        Target : URL
        URL : javascript:apex.submit({request:'TEST',set:{'P6_HIDDEN':#EMPNO#}});
         // here P6_HIDDEN is item where i am setting EMPNO to that column, if you want to set any value to any item that you want to use in process then create Hidden item with protected value no.
    or if you want to show confirm message before submitting the page then use apex.confirm in place of apex.submit .
    Hope this helps you,
    Regards,
    Jitendra

  • Buttons on interactive report

    I have created an interactive report. At the end of each line of the report I want to create a button. When pressed a process would be run updating a table with the product code that is displayed on that line of the report.
    How do I go about creating buttons for each line on the report?

    Hello,
    We don't like "cannot be done in Apex"... ?:|
    So here is the (a) solution:
    select      "DEMO_CUSTOMERS"."CUSTOMER_ID" as "CUSTOMER_ID",
          "DEMO_CUSTOMERS"."CUST_FIRST_NAME" as "CUST_FIRST_NAME",
          "DEMO_CUSTOMERS"."CUST_LAST_NAME" as "CUST_LAST_NAME",
             '<a id="P16_DOIT" href="javascript:doSubmit(''Go'')"><img alt="Go" src="/i/go.gif"/></a>' as "Go"
    from      "DEMO_CUSTOMERS" "DEMO_CUSTOMERS"And set 'Display Text as' of the last column to 'Standard Report Column'.
    Of course the javascript can also call any other function - with any other parameter - you like...
    Greetings,
    Roel
    [http://roelhartman.blogspot.com/]
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Help on print button for interactive report

    Hi,
    I have created an interactive report and have also added a print button on the button of the report (unfortunately forgot how I did it). Say my column on the reports was Col_No, Col_First_name, Col_Last_name and a print button when I pressed a would get to choose open or save a pdf file, if I opened or saved it, I would had the same info on my pdf report as above.
    Since I have changed the column order meaning I have Col_No, Col_Last_name, Col_Start_Date, Col_First_name and that is working fine but when I click on the print button I will get the pervious columns.
    I noticed I have created a branches to print the report, basically after processing, when button was pressed an action with f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=6259824360775969936:&DEBUG.::: is present.
    I need help to fix this and I do very much appreciate any help or suggestions
    -regards
    ahmadii

    Found the answer, thanks.

  • Adding print button to interactive report

    For now I have the downloaded to PDF option checked so the user can print an interactive report via the widget.
    I would like to have a print button on the report also.
    Has anyone got any of the java script stuff working off of a button?

    Hi willjamu ,
    All you should have to do is call the 'PDF' request to download the same report the drop down will create.
    f?p=355:14:3381437251536222:PDF::::
    I hope I was able to answer your question let me know.
    Mike

  • APEX 5: Problem displaying breadcrum (Create) button on interactive report

    Hello There
    I am trying to build a small app in APEX 5. I am taking the default 'Sample Database Application' (SDA) as an example for design.
    In SDA the interactive report of Customer a breadcrumb 'Create which is displayed on the top right corner. I am trying to replicate the same in my interactive report, but in vain.
    I have attached the printscreen for your reference. Could you please guide and advise me on how to get the same functionality of breadcrumb create button,etc same as in displayed in SDA into my custom app in APEX 5?
    Thanks a lot for helping me out
    Regards
    Don

    hi ,
    i had used like this .. it is working...
    *&      Form  USER_COMMAND
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            R_SELFIELD TYPE SLIS_SELFIELD.
      clear : v_flag.
      CASE R_UCOMM.
        WHEN 'DATA'.
    LOOP AT IT_TEMP.
         if it_temp-checkbox =  'X'.
              v_flag = 'X'.
              v_pernr1 = IT_TEMP-PERNR.
    *--Get compensation data and populate final internal table
              refresh it_fin.
              CALL FUNCTION 'Z_HR_COMP_STATEMENT'
                EXPORTING
                  PERNR = v_pernr1
                  BEGDA = s_date-low
                  ENDDA = s_date-high
                TABLES
                  FINAL = it_fin.
              if not it_fin[] is initial.
                delete adjacent duplicates from  it_fin comparing pernr.
                read table it_fin index 1.
                move-corresponding it_fin to it_final.
                append it_final.
                clear it_final.
              endif.
            endif.
         enddo.
    ENDLOOP.
          if not v_flag is initial.
    *------ display final data
            PERFORM final_display.
          else.
            message s000 with 'Select atleast one pernr'.
          endif.
      endcase.
    ENDFORM.                    "USER_COMMAND
    regards,
    venkat.

  • Buttons in Interactive Reports

    Hi,
    I have created a IR with columns x,y,z where y and z should retrieve the sysdate time. I have created y and z columns with HTML expression
    <input type="submit" value="Start"/> and <input type="submit" value="Stop"/>.
    I try to do the following when the user clicks start(i.e y) column in the report the system date should get updated/inserted in the table same way to the stop (i.e z)column.
    The following trigger can retrieve the system date value
    CREATE OR REPLACE TRIGGER "START_TIME"
    before insert
    on SESSION_STEP
    for each row
    begin
    :new.start_time := sysdate;
    end;
    Whether i need to work some where on column link on column attributes?
    I haven't done this before so just got stucked.
    Any help is appreciated.
    apex - 3.2
    database - oracle 10g express edition
    browser: Firefox

    Found another post on the forum (using google...) and it seems to be a bug. Is this already fixed in APEX 3.2?
    Re: Apex Import/Export - Losing search button template of interactive report
    Regards,
    Jacob

  • Branch process using javascript to call popup

    I am on Windows Vista, Oracle XE and Apex 3.1.0.00.32.
    The branch works when using region based button.
    I wanted to use a "button displayed among this region's items" for a "button" list in the sidebar. I created a button and used a branch based on :REQUEST = 'button_name'. The branch fires but I get an error "Internet Explorer cannot display the webpage."
    HTML header code
    <script language="JavaScript" type="text/javascript">
    function popup(pURL, pwidth, pheight) {
    html_PopUp(pURL,"winLov",pwidth,pheight);
    </script>
    Branch Code
    javascript:popup('f?p=&APP_ID.:10012:&APP_SESSION.:&REQUEST.::10012:P10012_ISS_ID:&P10011_ISS_ID.',500,350);
    Since the code works in the URL redirect on a Button in a region position but not in a Branches redirect to a URL I assume this functionality does not work? Can anyone shed light on this? If it doesn't work I will need to find another solution....
    Thanks,
    Sam
    I did search and found a thread that intimates it should work.
    link:calling javascript on a branch is this possible
    Edited by: slavanaway on Mar 23, 2009 4:14 PM

    Luis,
    I see that I did not put more detail into the issue than the title.
    I am trying to call a popup from a button among region items. The user makes a selection then some custom DDL fires and the popup closes and the calling page is refreshed.
    A button among region items does not have a redirect to URL like a button in a region position. So I made the branch that was conditional on the button. I think I knew that a "branch" is server side. I don't understand why the jvascript URL does not work.
    A button in a region position and a list that redirects to a URL both work. I wanted the list to look like button in a vertical row.
    I now have the functionality working with a list.
    So I am coming to the mountain to get enlightenment. The Branches on a page can not use javascript is my guess and being eternally curious I was wondering why. I hope knowing will help me save time and produce better apps in the future.
    As for the actual behavior. When the Branch for the button amonth the region items fires. I would get the error message and the URL would only show apex flows. I don't have the exact URL as I dis-assembled the list and branches.
    I think the branch goes to the server but either the javascript is not passed or it does not handle the javascript.
    Tx,
    Sam

  • Is there a report viewer control for html5 using javascript?

    VS 2005,2008,2010,2012
    SSRS-2008,2012
    I want to be able to create a simple report viewer that will run on ios, android, and win8 devices.
    I believe that the solution lay with the concept of HTML5 and javascript.
    If I use aspx and vb also HTML5, then don't I run the risk of the target device not having the required .net lbrary?
    Is that correct? Or does the server alone need the library? what about printing or saving as PDF options on the client side?
    So is there a SSRS report viewer control that I can use to create a report that runs on any device that supports HTML5? I want it to look professional.
    Or any technique or tutorial that I can look at to accomplish this goal?
    Thanks
    Jerry C 

    Hi Jerry,
    To work around this issue, you can write .aspx pages using html 5 and use ReportViewer control or iframe to display the report. For more information, please see:
    http://www.hanselman.com/blog/AnnouncingTheWebStandardsUpdateHTML5SupportForTheVisualStudio2010Editor.aspx.
    Since the ReportViewer itself uses Ajax, if the mobile device doesn't support that, you're better use some type of front end code to pull data from a web service and render it.
    Besides, according to the document
    View Reporting Services Reports on Microsoft Surface Devices and Apple iOS Devices, to view and interact with a report on iPad device or Microsoft Surface device, there are several methods:
    from Email subscription
    from Windows Azure portal
    from Report Server
    from Report Manager
    from a SharePoint document library
    from SharePoint web part
    So, it seems impossible to view report through Report Viewer control on mobile devices.
    Reference:
    http://forums.asp.net/t/1863129.aspx/1
    Hope this helps.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Kill processes (using Javascript) on a 64-bits machine (Windows Vista, 7, 8, 8.1)

    Hi everyone. I have a simple VBScript sample that kills a process by name. It works fine on every OS, X86 and 64 bits :
    ---------------------------kill process sample----------------------------------------
    Set wsh = CreateObject("Wscript.Shell")
    wsh.Run "calc.exe",1
    Set Processes = GetObject("winmgmts:").InstancesOf("Win32_Process")
    For each Process in Processes
    Select Case LCase(Process.Name)
    Case "calc.exe" 
    Process.Terminate(1)
    I tried the "for" loop, the "forEach" loop and "switch" in javascript but none of them work like in VBScript.
    Could anyone help me converting this script sample to javascript, since VBScript became obsolete and God knows whether it will be available for HTA applications and Windows Script Host files in the near future.
    Thanks a lot in advance.

    Jvr, you said :
    "What you have done is one of the reasons why support for ActiveX is being dropped.  By allowing unsafe controls you have removed the most important security restriction.
    I highly recommend that you spend some time learning Windows but not from web sites or from people who are just hackers.
    If you are going to alter IE you might as well just use an HTA.  It doesn't reduce security and is much easier to use.
    You are trying to do what a lot of new and untrained people try.  You are trying to reinvent Windows but mostly because you do not have fundamental technical training.  Get the training and you will not be led down these pointless paths.
    NTVDM is not CMD.EXE.  NTVDM is used to emulate a 16 bit DOS environment. It is not required for NT or for CMD.EXE.  It is disabled by default on all modern versions of Windows.  16 bit applications can be a security issue and
    do make managing Windows harder."
    One of the best features of IE might be ActiveX technology. I could be wrong, but some controls are still highly used by websites, and a lot of softwares help rely on HHCTRL ActiveX. I don´t see it *currently* being dropped.
    Could be in the future, but not only IE uses Activex, a lot of programs make use of them, not to mention popular ones like Word, Excel.
    My friend, I use Windows for more than a decade, don´t tell me what I have to learn or not. You´ve got to be kidding because I know a lot but of course I am humble to admit I ´don´t know everything and can at times have doubts, other people can help
    just like I could help when someone has a doubt on something I know. Also I dont know why you are talking about hackers. As far as I know they *must* know the OS in order to exploit stuff and run their malicious code, not only know how to exploit general vulnerabilities,
    so I bet the real hackers have a lot to teach.
    I am not untrained, sorry but you must be high since you are not reading my posts correctly. I said I altered security setting for the *INTRANET ZONE*, not Internet, and also set the "Websites in less privileged zones can navigate to thiz zone" to deny.
    And if you are an expert you must know the intranet zone is disabled by default, which is my case, but if you add an IP address or website, then it will be enabled *only* for them. Furthermore an attacker would need to know what is the IP address I added and
    would need to bypass the cross site scripting filter and also the setting above that I disabled.
    Again, you´ve gotta be high. I never said CMD=NTVDM. NTVDM just emulates a 16 bits program which is Command.com, I said in the other post, didn´t you read?
    And you can´t tell if MSHTA, ActiveX and WSH will be totally removed from Windows in the future, it is only a possibility. They are useful. 16 bits apps are not but are still supported on 32-bits Windows. Check out on a 32-bits system, and tell me if
    you found some 16-bits apps including C:\windows\system32\command.com.
    Hope now you understood what I have written.
    cheers.

  • Is it possible following batch processing using javascript...?

    Hi Everyone,
    Is it possible with in javascript following batch processing?
    • Open all PDF files in folder
    • Get which font to be used
    • Get which color plate to be used (i.e.) CMYK or RGB
    • Get page trim size width and Height.
    • Close the file
    • Past in Excel or note pad
    Please help me,  i have do so many files do the same process.
    Thanks in advance.
    -yajiv

    Some time ago I was looking for a way to find out a pdf’s page-count and this was one of the solutions I was presented with (Bridge might offer a better sollution, though):
    #target photoshop
    thePageNumber = getPDFPageCount ( File.openDialog("select pdf"))
    alert (thePageNumber);
    // by jezz, based on something by xbytor i guess;
    function getPDFPageCount(f) {
    f.open ('r');
    var gotCount = false;
    while (! gotCount) {
    next_line = f.readln();
    if ( f.eof ) {alert("Aborting the script\nWe've got to the end of the file without finding a page count");
         f.close();
         exit();
         if (next_line.indexOf ("/N ") > 0 && next_line.slice(0, 9) != "<</Length" && next_line.slice(0, 9) != "[/Separat") {
         var p = next_line.match (/\/N (\d+)\/T/)[1];
         gotCount = true;
         else if (next_line.indexOf ("/Pages") > 0 ) {
    //      alert (next_line);
         var p = parseInt(next_line.substring(next_line.indexOf("/Pages") +6), 10)
         gotCount = true;
    f.close ();
    return Number(p);
    I suppose this approach could be modified to address some of the features you are looking for.
    But the issue might be a fairly complicated one, as a pdf may for example combine many different TrimBox-sizes.
    Have you asked over in the Bridge Scripting Forum, too?

  • Interactive Report - Go button perform a page submit?

    Hi,
    Is it possible to obtain a normal page submit when the Go button in Interactive Report is submitted?
    I would like a normal page submit as this is the reliable way to have my different check boxes and select lists saved. These checkboxes and select lists act as bind variables in the IR query, and I do not get reliable results without the page submit. You may for instance experience that the report output looks ok according to your selections, but when you then download to excel, the report content reflects the true session state values.....
    Alternatively is it possible to remove/hide the Go button? I could then add a normal button to perform the page submit. I just do not like to confuse my users with two buttons..... for the same purpose....
    Best regards,
    Jesper

    Hi,
    With jQuery you can easily change that button attributes.
    E.g. set button to submit page, add below to page HTML header
    <script type="text/javascript">
    $(function(){
      $('.apex_finderbar_left .formlayout td input[value="Go"]').removeAttr("onclick");
      $('.apex_finderbar_left .formlayout td input[value="Go"]').bind('click',function(){
        doSubmit('MYREQUEST');
    </script>If you like hide button, add to page HTML header
    <script type="text/javascript">
    $(function(){
      $('.apex_finderbar_left .formlayout td input[value="Go"]').hide();
    </script>Remember load jQuery javascript library also.
    Here is one guide how install jQuery
    http://www.danielmcghan.us/2008/06/jquery-in-application-express.html
    Br,Jari

  • Can interactive report have 2 "special" columns?

    I have an interactive report on which I have placed a column for redirecting to a detail form. But I want to, also, put a column that will contain a button which will perform an action (update 2 columns in db). This way if the user wants to close the entry on the db they can click this button without having to go to the detail screen. So, they can go to the detail screen and close the entry or they can just click on the button to close the entry. I would love to have it be done with a right-mouse click menu but I suspect that is too much to ask which is why I thought the button might be ok.

    I took a different approach but this might work for you...
    On the interactive report, defined column1 as 'CheckBox' using this syntax:
    Select APEX_ITEM.CHECKBOX(1,c.s_id) "s_id_checkbox", column2, column3 etc. from my table - Note: APEX_item.CHECKBOX can create the checkbox as 1st item on the IR report
    once the item is defined, set the item header in the 'Report Attributes' tab to: <input type="checkbox" onclick="$f_CheckFirstColumn(this)" title="Select"/> and column type: Standard Report column - This will give the each row of the IR check/uncheck facility for the user. Make sure when you run the IR in developer mode, to 'Select' the newly defined 'checkbox' column in the 'Actions' menu and Save the report as 'Public' report. Also, move the newly-defined 'check-box' column as 1st column to display on the IR.
    Introduce a button Item on the IR Page, that will submit a page process. Write your PLSQL procedure or DML calls in this page process, for performing your database operation on your list of 'checked items'
    Page Process upon button submit: Code Example only. You may need to implement as per your reqs.DECLARE
    v_request VARCHAR2(100) := v('REQUEST');
    v_count pls_integer;
    v_selected_item_id pls_integer;
    BEGIN
    :P1_PROCESS_MSG := NULL; --This should be set the page processes 'success' and 'error' message properties to &P1_PROCESS_MSG. (Define new item P1_PROCESS_MSG on your page of IR)
    IF v_request = 'YOUR_BUTTONS_REQUEST_NAME' THEN
    --//Process each user selection via the PLSQL page process api call
    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    v_count := v_count+1;
    BEGIN
    v_selected_item_id := APEX_APPLICATION.G_F02(i);
    --// CALL_YOUR_PLSQL_PACKAGE or Custom DML BY PASSING THE USER SELECTED RECORD_ID TO PERFORM YOUR DATABASE DML and by using the 'v_selected_item_id' as a parameter or DML condition to perform your database DML action.
    EXCEPTION WHEN OTHERS THEN
    :P1_PROCESS_MSG := SQLERRM;
    END;
    END LOOP;
    END IF;
    EXCEPTION HANDLER..
    :P1_PROCESS_MSG := SQLERRM;
    END;
    Usage:
    User runs the IR, checks on the records he/she wants to do the 'close' then clicks on the new button that does the 'multiple-close' for the records of choice. He/she can select just-1-row and do the same dml operation by clicking on a button that you defined on this IR Report's page.
    Also, if the above approach is not viable, you can create a 'f?p...' column link on your IR's main query to submit the page upon user-click. But, I've seen the above approach lot more liked by users.
    SK
    Edited by: VSKumar on Feb 7, 2012 5:45 PM

Maybe you are looking for

  • HDMI and PC inputs do not work on my 37AV502R LCD TV

    HDMI inputs and PC inputs do not work consistently my Apple TV (HDMI) and computers 2 on HDMI, 1 on PC, display just fine n the TV but after a while the TV goes blank, the time is not consistent sometime a few minutes, sometimes a few hours, but ever

  • No prompt to avoid duplicate imports in iphoto 5

    Now that I've upgraded to Life '05 and tried to import pictures from my Canon Power Shot S2 IS, I no longer am prompted by iphoto to ignore importing duplicate pictures already in my library from previous imports. I'm not ready to delete these images

  • Oracle 10.2.0.3 apparent XML bug

    A very simply query using 'string-join' fails but works with 'concat'. The error we get is: ORA-19112: error raised during evaluation: java.lang.OutOfMemoryError The basic query is (its attempting to join "_A" to about 5000 rows - see the query below

  • Mail Doesn't Warn if Subject: is empty

    If both the content of the mail body and the Subject header are empty, Mail opens a warning box to let yo u know. But if just the Subject is empty, mail doesn't warn you. Seems like it used to. Now, BOTH body and Subject need to be empty. I would be

  • [solved] Removing midori and local data

    Hi all, I am trying to clear my browsing data from midori, but I cannot seem to get rid of some autosuggestions in the location bar. (I believe the suggestions are all of past bookmarks.) So I tried reinstalling midori, but the data remained. Is ther