Call javascript to expand detail row when report runs

Hi,
Is there any way to call javascript when report is run? What I want to do is to expand all detail rows (of Carl's Ajax report row detail example) when the report is run. In the original example, an user needs to click the link in the report row in order to display its detail row. I would like to expand all the rows as soon as the report is run.
Thanks.
Andy

Hi Andy,
You can use jquery to fire all the onclick events within the DIV's on the page.
In the HTML Header add
<script type="text/javascript">
function allclicks(){
$("div").click();
</script>In the HTML Body Attribute add
onload="allclicks();"You will also need to load the jquery files.
Regards
Paul

Similar Messages

  • Less coloumns displayed when report run in background

    Hi,
    There is a problem, when i run a report in background last few columns are not displayed. But when i run it in foreground all the columns are displayed properly.. Bt since the report hs to be run background, I need to fix this issue..
    Cn anyone explain why this is happenin and wht i cn do to rectify it?
    Thanks
    Keshi

    Hi,
    Use REUSE_ALV_GRID_DISPLAY and you will be able to run the report in foreground or background.
    If you must use OO ALV controls, you won't be able to run the program in background. In this scenario, I would check SY-BATCH and if it is set, I run REUSE* FM and if not I do CALL SCREEN..
    If you are using the ABAP Grid Control (OO object), you can still create the ALV list as a spool listing for the background job.
    The easiest way to do this is to put all the create object statements and method calls for the custom container and ALV grid object inside a subroutine (for example, present_grid).
    All that is required is a simple check of the sy-batch variable to determine if the program is being executed in the foreground or background.
    e.g. if sy-batch is initial.
    call screen 0100.
    else.
    perform present_grid.
    endif.
    In a PBO module of screen 0100, the subroutine present_grid is also performed.
    The set_table_for_first_display method will be invoked in the routine present_grid, however, due to the job being executed in the background, the ALV list output will be written as spool output for the background job.
    Regards,
    Srini

  • How to change the Browser title when report runs on the web?

    Hi folks,
    How to change the title of the browser when I run my report on the web? Iam using Internet explorer and Reports 6i. Is it possible in 6i or 10g reports?
    Could you please tell me the step by step procedure ?
    Right now the browser is displaying the URL when I run the report with format = PDF.
    Thanks.

    It works for me. I don't see why you have a problem with >this code.
    Can you look at the source code of the html >file that was created (so, not in the browser, but in a >text editor). What do the header and title look like?The Html code in the file is same as the above code I specified. Actually I copied the same code and pasted here. But when I run the html file the Title shows up.
    Don't put </html> there. Maybe that helps. I tried this, but it did not work.
    Please let me know is there any way to set it dynamically inside the triggers using SRW built_in.
    Thanks alot.

  • Length exceeds When report run in bachground.

    Hi,
    When I run the report in back ground, output eceeds and getting data in next lines.
    I need output in a single line each record.
    Suggest me on this issue.
    Regards,
    Rayeez

    Hi,
    Change the width of your report according to your requirement.
    You can do this the following way :
    report zzzz line-size i.
    where i is a numeric constants.
    Regards,
    Abhinab Mishra

  • Data is missing in Even Page when report running in background (spool)

    Hi
    I have this weird problem in my report. The report would run in background convert the data in to PDF from spool and then email it to people.
    Now when the PDF has more then 1 page the error occurs.
    It drops the last row from the even page. The total at the end and every thing shows correctly. If there r more than 2 pages then on page 3 the last row is not dropped and its all fine but again on page 4 it drops one record and on page 5 again its working fine.
    One thing is it also puts an extra line(horizontal line which is not in the code) on those pages where its unable to put the record and its always the last one on the even page. I also looked up the spool. Its doing it in the spool too. So i think its not the PDF converter its when the spool is getting created for some reason its droping the rows for the even pages...
    Did any one else encountered some thing like this? please help.
    Thanks
    Message was edited by:
            Anwarul Kabir

    is there any problem with Background spools with SAP? We are running R3 here. And looks like its the spool background job that's creating the error. When i execute the report it shows all the record in print preview or if i print it.
    Please Help!

  • Virtual Memory System error when report run on developer 6i

    I want to execute a report via ref cursor which is called from a package on developer 6i. I have face a error.Which is
    Rep: 0065: Virtual Memory System error.
    Rep 0200: Cann't allocate enough memory cavaa22.

    I get the same error. I speed up the virtual memory system of the operating system.

  • Re: AJAX-Calling JavaScript function

    Hello!
    So i've been reading abt AJAX and i'm trying it out now. I have a problem or two.
    Take a look @ this scenario plz.
    I have a Page HTML header with the the following script
    <script language="JavaScript1.1" type="text/javascript">
    function setFocus(PageItem) {
    document.getElementById(PageItem).focus();
    function validateLogin(User,Pwd) {
    alert("Here Now.");
    if (document.getElementById(User).value == "") {
    alert("Login ID must have a value provided.");
    document.getElementById(User).focus();
    else if (document.getElementById(Pwd).value == "") {
    alert("Password must have a value provided.");
    document.getElementById(Pwd).focus();
    document.getElementById(Pwd).select();
    else {
    doSubmit('SUBMIT');
    </script>
    I have a button which is supposed to call the validateLogin function . In its' Optional URL Redirect, ive set Target=URL
    and URL Target as
    javascript:validateLogin('P4_USERNAME','P4_PASSWORD);
    however when i run the page and try to press the button, i get "Error on page" at the bottom left hand corner of my browser.
    Also, u notice i put an alert
    alert("Here Now.");
    just @ the beginning of the function to see if the function is actually called but the alert didn't even get displayed.
    Am i calling my function wrongly. Hope i've explained the scenario ok. Any ideas on this plz.
    big thnx

    Hello,
    You're missing a quote at the end of 'P4_PASSWORD.... So try
    javascript:validateLogin('P4_USERNAME','P4_PASSWORD');
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Fill Last Page of Rows when Paging through Rowset

    Hi,
    In the Tunning part of the view object, there is a option called 'Fill Last Page of Rows
    when Paging through Rowset'. I cannot clearly undertand what it means by looking
    at the help. Then I try to uncheck that option and then drop and drag the View to
    the jsp to see what the difference is.
    It seems that there is no differnece by looking at the before and after vesion.
    Anyone can help to explain it.. Many thanks in advance.
    Ivan

    Hi,
    I am reading the section of 'Improving the Web User Experience' but I still do not have a
    good grasp of it.
    It said that 'When you test the browse page, you'll notice that the first page shows rows
    1 through 10 as expected but that the second page shows rows 5 through 14 instead of
    rows 11 through 14'
    For my program, I set it showing 15 records each time. Originally it is showing '1-15'
    records. When I select '16-30 of 68' of the comobox, the second page is really
    showing what it means. It didnt happen that it is showing the previous records.
    Ivan

  • Query not showing detailed result when run through query Designer or Portal

    Hi,
    There is one query which not showing detailed result while running through Query Designer or run in Portal.
    But strange thing is that it is showing the detailed result when i run it through BeX Analyzer.
    While all the other queries don't have this problem in system. All showing the correct detailed result.
    If anyone have some idea on this issue plz let me know.
    Regards,
    Javed
    Edited by: Javed Akhtar on Jul 7, 2009 3:59 PM

    Hi,
    We can do this setting in WAD. Please check the web template and try to remove that setting. When you have hierarchy then we can display only till certain level in portal, this setting is done in web template APIs, but in bex analyzer you can see all the detailed information.
    Edited
    Go through this thread for some more detailed information
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/7b5f0a95ce12d0e10000000a422035/frameset.htm
    Regards,
    rik

  • Internet explorer consuming huge memory when OBIEE reports Run

    Hi all,
    I am running OBIEE report. But when reports run for displaying results, then Internet Explorer consumes huge memory( can view in Task Manager) and so all other application becomes very slow and dont work. I am using XP operating system and 1 GB Ram. OBIEE is installed at Server and i am running report at other system by accessing URL of the server.
    Please tell me the solution so that Internet Explorer does not consume huge memory.
    Thanks,
    Avnish

    Use FireFox.

  • No. of Detail Rows

    Hi,
    A challenge for you all!
    I am building a product details system in Portal forms.
    One of the screens is a Product Ingredients form with Product as the master block and ingredients as the Detail block. There can be between 1 and 20 ingredients in any 1 product and as these all have to sum to a volume percentage of 100% the client would like to see all ingredients for a product on 1 screen and not have to do Next/Previous to see them all.
    As you increase detail rows on a master detail form the performance of the form decreases dramatically so I would like to minimise the number of detail rows displayed for each product to maximise performance.
    To this end I wish to dynamically modify the number of detail rows displayed to match the number of ingredients on a product as that product is queried.
    I can handle figuring out how many rows I want to set the page to but have not been able to figure out how to change the number of detail rows displayed at run time.
    Anyone know how (or if!) this is possible ?
    All help gratefully recieved
    Andy

    Hi,
    You can only specify the number of details rows at design time. There is no option to change it at run time.
    Thanks,
    Sharmila

  • Dynamically modifying the number of Form detail rows

    Hi,
    A challenge for you all!
    I am building a product details system in Portal forms.
    One of the screens is a Product Ingredients form with Product as the master block and ingredients as the Detail block. There can be between 1 and 20 ingredients in any 1 product and as these all have to sum to a volume percentage of 100% the client would like to see all ingredients for a product on 1 screen and not have to do Next/Previous to see them all.
    As you increase detail rows on a master detail form the performance of the form decreases dramatically so I would like to minimise the number of detail rows displayed for each product to maximise performance.
    To this end I wish to dynamically modify the number of detail rows displayed to match the number of ingredients on a product as that product is queried.
    I can handle figuring out how many rows I want to set the page to but have not been able to figure out how to change the number of detail rows displayed at run time.
    Anyone know how (or if!) this is possible ?
    All help gratefully recieved
    Andy

    The rownum pseudo-column hold the number of the row but it doesn't work like you expect. It is assigned before sorting for example and it is not absolute. SQL conceptually deals with sets and sets have no inherent order. See http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    If you want to have an absolute number in a row you will need to maintain it yourself with PLSQL code.

  • Add Row in detail table when check box is checked on a master report table

    Hi,
    How could I detect the click on the check box within a Report and then insert a row in a detail table?
    Many thanks for your help
    jko

    Hi Yogesh,
    That is all handled by the cloneRows() function described in that thread.
    In that function, we first insert a new row:
    var wNew = t.insertRow(ri + 1);ri + 1 = current row + 1 and tells javascript where to add the new row (that is, underneath the current one)
    Then, we loop through all of the cells on the current row and copy its cells into the new row:
    var c;
    var newCell;
    var oldCells = w.getElementsByTagName("TD");
    for (c = 0; c &lt; oldCells.length; c++)
      newCell = wNew.insertCell(c);
      newCell.className = oldCells[c].className;
      newCell.innerHTML = oldCells[c].innerHTML;
    }Next, we search for all INPUT items on the new row and clear the values:
    var inputs = wNew.getElementsByTagName("INPUT");
    var j;
    for (j = 0; j < inputs.length; j++)
      inputs[j].value = "";
    }And, finally, we call the updateInputs() function to rename all of the items on the page. Apex expects all items to have unique "f01_nnnn" etc names, adding in a new row upsets this, so we need to reset them:
    function pad(n)
    var s = '0000' + n;
    return s.substr(s.length-4);
    function updateFields(f)
      var fields = document.getElementsByName(f);
      var j;
      if (fields.length > 0)
        for (j = 0; j < fields.length; j++)
          fields[j].id = f + "_" + pad(j+1);
    function updateInputs()
    updateFields("f01");
    updateFields("f02");
    updateFields("f03");
    updateFields("f04");
    }without doing that, the data may get lost when the page is re-rendered.
    This is all called from a new Derived Column on the report. This column's HTML Expression is:
    &lt;a href="#" onclick="javascript:cloneRow(this)"&gt;&lt;img src="#IMAGE_PREFIX#FNDADD11.gif"&gt;&lt;/a&gt;which generates the + symbols which, when clicked, run the cloneRow() function
    Andy

  • How to expand/collapse detail rows per each row in APEX reports

    Hi
    I want to add functionality to my APEX classic reports which allows me to expand/collapse rows using something like +/- buttons. Please let me know how to achieve this.
    Thanks
    Hina

    Hi,
    This Carls example might help
    http://htmldb.oracle.com/pls/otn/f?p=11933:1
    See also post relating that sample
    Re: Question for Carl Backstrom
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Apex 3.2 hook javascripts to IR and execute those when report is refreshed

    Hi,
    You propably have see tricks to attache javascript to IR refresh using time out and gReport.l_LastFunction e.g. these.
    http://roelhartman.blogspot.com/2010/04/alternative-to-alternating-row-colors.html
    http://www.talkapex.com/2009/03/column-groups-in-apex-interactive.html
    Here is alternative solution:
    You need load jQuery 1.4.2 e.g. in page template header
    Create page zero if your application do not have one. Then create HTML region before footer with no template.
    Place code to region source
    <script type="text/javascript">
    ;(function($){
    $.htmldbIrBusyGrap=$.fn.htmldbIrBusyGrap=function(){
    /* for bind IR ajax */
    /* check do we have IR on page */
    if($('#apexir_WORKSHEET_REGION').length>0){
      /* replace apex internal function _BusyGraphic */
      gReport._BusyGraphic=function(pState){
       if(pState==1){
        /* ir ajax start trigger htmldbIrAjaxStart event and show loading icon */
        $.event.trigger('htmldbIrAjaxStart');
        $('#apexir_LOADER').show();
       }else{
        /* check is there data stored to #apexir_WORKSHEET */
        if(!$('#apexir_WORKSHEET').data('htmldb')){
          /* store data to #apexir_WORKSHEET */
          $('#apexir_WORKSHEET').data('htmldb',{irReady:true});
          /* trigger htmldbIrReady event */
          $.event.trigger('htmldbIrReady');
         /* hide loading icon and trigger htmldbIrAjaxEnd*/
         $('#apexir_LOADER').hide();
        $.event.trigger('htmldbIrAjaxEnd');
       return;
      $.event.trigger('htmldbIrReady');
    $.htmldbIrReady=$.fn.htmldbIrReady=function(fn){
    $(function(){
      if($.isFunction(fn)&&$('#apexir_WORKSHEET_REGION').length>0){
       $('#apexir_WORKSHEET_REGION').bind('htmldbIrReady',fn);
    })(jQuery);
    addLoadEvent(function(){$.htmldbIrBusyGrap();});
    </script>Now your IR will trigger htmldbIrReady event when report is refreshed.
    Usage example
    <script>
    $(function(){$('#foo').bind('htmldbIrReady',function(){alert('Hello');});});
    </script>Also it trigger htmldbIrAjaxStart and htmldbIrAjaxEnd events.
    Usage example
    <script>
    $(function(){$('#foo').bind('htmldbIrAjaxStart',function(){alert('Ajax start');});});
    $(function(){$('#foo').bind('htmldbIrAjaxEnd',function(){alert('Ajax end');});});
    </script>Or use function $.htmldbIrReady example
    <script>
    $(function(){$.htmldbIrReady(function(){alert('Hello');});});
    </script>Small demo that logs those events here
    http://actionet.homelinux.net/htmldb/f?p=100:87
    Hope this helps and you post other innovative solutions or usage examples about this
    Regards,
    Jari

    Jari,
    i have found my bug which prevented the Page from working.
    i have a custom build apex_loader
    <script src="#WORKSPACE_IMAGES#jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="#APP_IMAGES#jquery.simplemodal-1.3.5.js" type="text/javascript"></script>
    <script type="text/javascript">
    * @param pRegionStaticId ID of region to set to modal
    * @param pOptions Options for modal Screen. See: http://www.ericmmartin.com/projects/simplemodal/#options for more info
    goModal=function(pRegionStaticId, pOptions){
      var vDefaults = {persist: true, overlayCss: {backgroundColor: '#606060'}}; // Note: It's important that you leave the persist = true otherwise items values will be cleared
      pOptions = jQuery.extend(true,vDefaults, pOptions);
      // To maintain order of APEX items (see forum posting above)
      $('#' + pRegionStaticId).wrap('<div></div>');
      // toon het ajax laad scherm
      html_ShowElement('AjaxLoading');
      // Laat de region zien, in dit geval 'apexir_LOADER' --> het icoontje bovenin
      //  $('#' + pRegionStaticId).show();
      // Open het modal scherm
      //  $('#' + pRegionStaticId).modal(pOptions);
    }// goModal
    * Sluiten van het modal scherm
    modalClose=function(){
       // verberg het ajax laad scherm
       html_HideElement('AjaxLoading');
       $.modal.close();
    }// modalClose
    // OnLoad tasks
    $(document).ready(function(){
      // Voor alleen uit wanneer er een IR is op de pagina
      if ($('.apexir_WORKSHEET_DATA').length > 0) {
        // See apex_ns_3_1.js for _BusyGraphic
        function dispIRBusyGraphics(pState){
        if(pState == 1){
            // Here apexir_LOADER is the object ID.
            // You can use your own region if you wanted to etc...
         goModal('apexir_LOADER', {position:['30%',]});
        else{
           modalClose();
        return;
        }// dispIRBusyGraphics
        function updateIRJS(){
         // This time out is required since after the report is refreshed
         // via AJAX, need to reattach the l_LastFunction command
         setTimeout(
           function(){
            gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};
           1000
        gReport = new apex.worksheet.ws('');
        gReport.l_LastFunction = function(){dispIRColGroups();}
        // Need to put timeout since not registering on initialization
        setTimeout(function(){gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};},500);
        updateIRJS();
      } //If IR exist
    </script>and when i disabled this on page 0 the functionality was working correctly.
    Thanks for demoing this in the application.
    Marco

Maybe you are looking for