4 Replies Latest reply: Feb 14, 2012 4:33 PM by efultz RSS

    Can the interactive report search actions be customized?

    efultz
      on an interactive report the search box has many good functions. But I would like to add some of my own to the bottom of the actions drop-down. Is there a way to do this? This would eliminate the need for me to have additional buttons scattered around the top of the report - making for a cleaner design. So, where I will have a Close Alert button that will do actions against checked items on the report I would like that to appear in the Actions list under the Download option.
        • 1. Re: Can the interactive report search actions be customized?
          jariola
          Hi,

          You can modify action menu with JavaScript.
          See my example where I have append custom download button to menu (Print Excel Sheet)
          http://actionet.homelinux.net/htmldb/lspdemo?p=39

          Here is jQuery function
          (function($){
           /* Prepend to interactive report action menu */
           $.htmldbIrPrependAction=function(options){
            options=$.extend({
             separator:true,
             imgPrefix:"/i/",
             title:"",
             href:"",
             img:""
            },options);
            var lActionMenu=$("#apexir_ACTIONSMENU");
            if(options.separator){
             lActionMenu.prepend(
               $("<li/>",{"class":"dhtmlMenuSep"}).append(
                $("<img/>",{"class":"dhtmlMenuSep","alt":"","src":options.imgPrefix+"1px_trans.gif"}).attr({"width":"1","height":"1"})
               )
             );
            }
            lActionMenu.prepend(
             $("<li/>").append(
              $("<a/>",{"title":options.title,"class":"dhtmlSubMenuN","href":options.href}).text(" "+options.title).mouseover(function(){
               dhtml_CloseAllSubMenusL(this);
              }).prepend(
               $("<img/>",{"src":options.img,"alt":""})
              )
             )
            );
           }
          })(jQuery);
          And code I use in dynamic action after region refresh to append action menu
           $.htmldbIrPrependAction({
            title:"Print Excel Sheet",
            imgPrefix:"#IMAGE_PREFIX#",
            href:"javascript:prnExcel('#REGION_ID#')",
            img:"#IMAGE_PREFIX#menu/spreadsheet_32.gif"
           });
          Regards,
          Jari
          • 2. Re: Can the interactive report search actions be customized?
            efultz
            So I see your example and that is what I am looking for. But I can't load the application in my environment - maybe because we are using APEX 4. Where do I put the jquery function?
            • 3. Re: Can the interactive report search actions be customized?
              efultz
              Never mind - I figured it out, I think. At least I have managed to get your entry to show in my Action menu list and that is a good first step.
              • 4. Re: Can the interactive report search actions be customized?
                efultz
                ok - so I have the option showing in my action menu. I have, also, created a dynamic action named CLOSEALERT. This has event AFTERREFRESH, select type REGION and I specified my region. I don't believe this is right - what I need is a way to say when you click on the action request perform this dynamic action - right? Or, I have a process defined that does what I want on the button I am looking to replace. So, how do I get clicking on my action menu item to perform the process? Or the thing I want that is in the process (so if I have to move it somewhere such as the dynamic action then cool.

                I guess I am not understanding the link between clicking on the action menu item and the place (wherever) that I need to put what I want done.