Apex PPR built-in Javascript Functions

Can someone please explain the differences between the following apex built-in js functions as used with ppr reports.
If possible please specify the parameters they take.
1. $a_report();
2. init_htmlPPRReport();
3. html_PPR_Report_Page();
I have a requirement to show different child ppr reports based on the values passed from a parent report. I would like to show these reports dynamically. The child reports all get their values from common page items that I've defined.
I am to do this with one child report, but I'm having difficulty with more than one child report.
I can not create an example on http://apex.oracle.com/pls/otn because the db structure it is too big.
I hope somebody understands what I'm talking about and points me in the right direction.
Cheers,
Sutherland

I solved this problem.
It was because when the child reports initially loaded they returned no data because the items contained no values. Note that the items are only populated when i execute the js function from the parent report which pass the current row values of the parent report to the common page items. The common page items are used in the where clause of the child reports.
So initially the apex engine got no data from the db for the child reports. I had to change the where condition that included one of the common page items with the nvl function so that i can get something back if the item is null.
Thus it works perfectly.

Similar Messages

  • Problem saving Reader extended PDF created in Livecycle with Javascript functions built in

    Afternoon
    I have created an interactive PDF in Livecycle with built in Javascript functionality.  I need users to be able to complete and save the PDF so have saved it as a Reader extended PDF.  The problem I'm having is that when a user completes the form,saves it, and then opens it again the Javascript functionality is not showing despite showing the original selection that the user has made.  The Javascript is simply a dropdown menu that will show a different table based on the selection so isn't anything major.
    I've trawled forums and this is driving me mad so I'd appreciate some help.
    I am using Adobe Pro XI.
    Thanks in advance
    Ben

    At the moment I can't sorry.  I've run the Javascript debugger in Adobe Pro and it seems there are some errors
    Acrobat EScript Built-in Functions Version 11.0
    Acrobat SOAP 11.0
    ReferenceError: Table is not defined
    1:XFA:form1[0]:TextFieldContainer[0]:#subform[3]:#area[1]:Button1[0]:initialize
    ReferenceError: Table is not defined
    1:XFA:form1[0]:TextFieldContainer[0]:#area[2]:Button1[1]:initialize
    ReferenceError: Table is not defined
    1:XFA:form1[0]:TextFieldContainer[0]:#area[3]:Button1[2]:initialize
    ReferenceError: Table is not defined
    1:XFA:form1[0]:TextFieldContainer[0]:#area[4]:Button1[3]:initialize
    Basically the form has been built in Livecycle Designer and have drop down menus that show or hide tables depending on the selection but when I Reader Enable the form and users make a selection and then save the form it is not showing the table when it is opened again.
    I appreciate your help

  • Problem saving Reader extended PDF with Javascript functions built in

    Afternoon
    I have created an interactive PDF in Livecycle with built in Javascript functionality.  I need users to be able to complete and save the PDF so have saved it as a Reader extended PDF.  The problem I'm having is that when a user completes the form,saves it, and then opens it again the Javascript functionality is not showing despite showing the original selection that the user has made.  The Javascript is simply a dropdown menu that will show a different table based on the selection so isn't anything major.
    I've trawled forums and this is driving me mad so I'd appreciate some help.
    I am using Adobe Pro XI.
    Thanks in advance
    Ben

    http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/livecy cle_designer_es
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • Confirm() javascript function -  I would like Yes/No instead of OK/Cancel

    Hi All,
    I am using the confirm() javascript function and it works great! BUT, I would like Yes/No instead of OK/Cancel.
    Is there another function or a way to change the names used by the function.
    <pre>
    function SubmitCmd(sCmd) {
    var lpartial = html_GetElement('P44_PARTIAL').value;
    if(lpartial == 'Y'){
    // Go see if this partial exists for this ISD
    var l_DIST = html_GetElement('P44_DDDCCC').value;
    var l_ISBN = html_GetElement('P44_ISBN').value;
    var l_BKTYP = html_GetElement('P44_BK_TYPE_CD').value;
    var lapp=html_GetElement('pFlowId').value;
    var lpg=html_GetElement('pFlowStepId').value;
    var get=new htmldb_Get(null,lapp,'APPLICATION_PROCESS=odpExistingPartial',lpg);
    get.add('G_ITEM1',l_DIST);
    get.add('G_ITEM2',l_ISBN);
    get.add('G_ITEM3',l_BKTYP);
    var lexisting = get.get();
    get=null;
    if(lexisting != 0){
    // Show Alert Question
    var conf= confirm("There was a partial found for this ISBN and ISD."+
         "<BR>Do you want to add this partial to the existing one"+
         " found?");
    if (conf) {
         // Set up to call existing copy in Partial screen.
         html_GetElement("P44_COPY_ID").value = lexisting;
         doSubmit('ADD_PARTIAL');
         return;
    doSubmit('CREATE');
    </pre>

    Hello,
    The confirm() function is a built-in JavaScript function which you can’t alter.
    You can build your own dialog box, with any text and options you need. Search Google for “JavaScript modal dialog” and you’ll get references to a lot of examples. Not all of them are trivial to implement within APEX.
    BTW, if you want your code to maintain its format, you should use the forum internal tags [ code] and [ /code] (without the blanks). This way your code will be readable.
    Regards,
    Arie.

  • Apex supplied javascript function

    Hi,
    Anyone know where can I find all the apex supplied javascript function?
    Thanks
    Vincent

    Hello Vincent ,
    Carl’s application - http://apex.oracle.com/pls/otn/f?p=38704:1 – is the best source for now.
    The JavaScript library should be officially documented as part of the upcoming 3.1 version.
    Regards,
    Arie.

  • Passing text including special characters to Javascript functions

    I need to call a Javascript function with some text retrieved from the database, which may include carriage returns, line feeds etc. I need to change these to the Javascript escape characters "\r", "\n" etc. I can easily write my own function to do this, but suspect there may be a built-in one somewhere I could be using - but can't find one. Is there one?

    Tony,
    I tried using XMLDB_GEN.CONVERT and it worked for me:
    DECLARE
       v_value_to_save   VARCHAR2 (30);
    BEGIN
       v_value_to_save := DBMS_XMLGEN.CONVERT (:t_sql, 1);
       UPDATE my_table
          SET my_column = v_value_to_save
        WHERE my_key = :my_key_value;
    END;
    DECLARE
       v_value_to_select   VARCHAR2 (30);
    BEGIN
       OWA_UTIL.mime_header ('text/xml', FALSE);
       HTP.p ('Cache-Control: no-cache');
       HTP.p ('Pragma: no-cache');
       OWA_UTIL.http_header_close;
       FOR c IN (SELECT my_value
                   FROM my_table)
       LOOP
          v_value_to_select := DBMS_XMLGEN.CONVERT (c.my_value, 0);
          HTP.prn (v_value_to_select);
       END LOOP;
    END;
    /Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Built-in javascripts

    Hello All,
    On APEX 4.1
    I found the Add Row button has the built-in javascripts
    javascript:addRow();
    I wonder if there is a reference documenation to show all the available built-in functions?
    I found the below page for all javaScripts APIs, but it doesn't include addrow(), so I think there must be another documentation.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e12510/javascript_api.htm
    Many thanks
    Best
    Yang

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "975636".
    On APEX 4.1
    I found the Add Row button has the built-in javascripts
    javascript:addRow();
    I wonder if there is a reference documenation to show all the available built-in functions?
    I found the below page for all javaScripts APIs, but it doesn't include addrow(), so I think there must be another documentation.No, that is all of the API documentation. It may be unintentionally incomplete (i.e. documentation bugs), but some APIs are intentionally not documented as they are intended only for internal APEX use. Oracle may change the signatures, behaviour, or implementation of these undocumented and unsupported methods, or remove them completely without notice. Use of undocumented APIs by developers may result in loss of data, and/or failure of your applications, APEX installation or database. Oracle may not provide support in cases where damage has occurred as a consequence of using undocumented/unsupported features.

  • JavaScript function which fetches return_value from List of Values

    Hi,
    I have created List of Values named "NICKS". I want to write JavaScript function "get_workers_fullname(nick)" which returns display_value from List of Values. The parameter of function is return_value of List "NICKS".
    I am new with this and don't know how to handle this case.
    Please help me.

    Hi,
    The LOV, I mean is the item in Application's Shared Components. I don't mean the visible SelectList on the page.
    This is what I found in ApEx's help: "A List of Values can be referenced by page items as well as report fields. It controls the values displayed and limits the user's selection. Lists of Values can be static (based on values you enter) or dynamic (based on a SQL query)."
    I'd like to access values in such LOV from JavaScript. I am not sure it is possible.
    Cheers,
    Tom.

  • 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

  • Javascript-function doesn't work with user nobody

    I recently started to use AJAX with APEX. I defined a Application Process and a Javascript-Function which fetch values from a Lookup-Table into some fields, which works great. Except when I make the page available public (user nobody), then it doesn't work anymore.

    Hello,
    Do you have page 0 (zero) in your application? If you are using page 0 as a parameter in your htmldb_Get function, the page must be public (http://htmldb.oracle.com/pls/otn/f?p=11933:63).
    Regards,
    Arie.

  • How to execute a javascript function in the body onload?

    Hi everyone!
    As you know in the HTML body attribute. You must specify the value of onload
    What is the correct sintaxis for execute a function since in the onload body?
    I only want to do some like this, but only I do it in APEX:
    <body onload ="javascript:namefunction();" >
    I do not know how to use #ONLOAD# when you using want to set some value.
    Could u help me please ?
    Any help would be very appreciated.
    Thank u in advance
    Best Regards

    Hi Chris
    Thank you for your help
    I tried with the next code but it doesn´t work.
    Do you know for what?
    Best Regards
    I paste the next code in the HTML Header :
    <head>
    <script language="JavaScript" type="text/javascript">
    function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function'){
    window.onload = func;
    else {
    window.onload = function() {
    oldonload();
    func();
    function ejecuta()
    doSubmit('ACEPTAR_R')
    addLoadEvent( ejecuta );
    </script>
    </head>

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Select list display value in javascript function

    Hi All,
    I have a select list in a tabular form having a display value & return value.
    I am using $x(var_name).value or $v(var_name) for retreving return value of the select list in a javascript function.
    Can anyone let me know how can I get the display value of the select list in a javascript function? Im using Apex 3.2
    Thanks & Regards,
    Sandeep

    What if the select list is not an item. Select list I am talking about is in a tabular form.Regardless of how they're generated in APEX, in JavaScript they're all DOM nodes. There are many ways of accessing the node of the required element. Consider the Items for Order... tabular form on page 29 of the Sample Application:
    var productNameLOV = document.wwv_flow.f04[0] // select list containing name of product on first order line
    var productNameLOV = $x("f04_0001") // another way of accessing the same node, using the ID attribute generated by apex_itemWe can see this using the Safari console:
    => productNameLOV = document.wwv_flow.f04[0]
        <select name="f04" id="f04_0001" autocomplete="off">…</select>
    => productNameLOV = $x("f04_0001")
        <select name="f04" id="f04_0001" autocomplete="off">…</select>Once you've got the node&mdash;however you get it&mdash;you then use the methods shown above:
    => i = productNameLOV.selectedIndex
        3
    => productNameLOV.options.text
    "Business Shirt [$50]"
    So it appears you would use:var item = document.wwv_flow.f01[i];
    var selected = item.selectedIndex;
    var selectedOption = item.options[selected].text;
    This is meaningless:...
    var my_var = document.wwv_flow.f01[i].id; // f01 is tabular column of select list
    if ($x(my_var) == 'display_value') //$x(my_var) is having return value, but i need display_value there
    <tt>$x(my_var)</tt> returns a DOM node object, whilst <tt>'display_value'</tt> is a string: they are not comparable.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Filter items are not set via Redirect to a javascript function

    Hi,
    i have a page with a few filter items and a button which redirects to a javascript function. The problem is that the filter items are NULL in the called javascript function. If i do a submit via another button before then it works.
    Here the details:
    URL Target of the button: javascript:callReport('f?p=&APP_ID.:1:&SESSION.','bir.bir_api.printReportBi?pSessionId=&SESSION.&pBu=&P250_FILTER_BU.&pSupplyTeam=&P250_FILTER_SUPPLY_TEAM.&pMaxBiEff=&P250_FILTER_BI_EFF_MAX.&pGroup=&P250_FILTER_GROUP.');
    Called javascript function:
    function callReport(p_href,p_url)
      var url;
      url = document.getElementById(p_url).value;
      w = open(url,"winRep","Scrollbars=1,resizable=1,width=1100,height=800");
      if (w.opener == null)
        w.opener = self;
        w.focus();
      // wait 5 seconds before reloading
      setTimeout("waitSome()",100);
    Many thanks in advance.
    Regards,
    Martin

    Hi Martin,
    In my example I do a refresh of the report region using  adynamic action. In the report source I've set my filter item as "Page item to submit".
    To open the link for the pdf report I use a dynamic action that fires after refresh of the report region.
    That's it.
    If you want to use your callReport function and need to submit your filter items first, you could try using a ajax post to send the filter values to the database. There's a nice explanation on ajax post in this blog:
    http://apextips.blogspot.nl/2012/09/apex-ajax-basics.html
    Good luck,
    Vincent

  • Calling Javascript function from PL/SQL Process

    I am new to APEX and Javascript so please forgive my question.
    I have a process on page which successfully runs a few procedures etc. but now, as part of this process, I want to call a javascript function I have typed into the HTML Header.
    My question is how can I call the javascript function from my process? Is it possible?
    Many thanks
    Winnie
    ps. as an example my javascript looks like:
    <script language="JavaScript">
    function test(){
    var decision = confirm("Click a button below and watch what pops up next.");
    alert(decision);
    </script>

    See: How to call a javascript function from pl/sql?

Maybe you are looking for

  • Hi all  urgent

    hi all  experts pl i want to display selection screen and below selection screen i want to display output of the report. how is this possible?? sample code please. thanx rocky

  • Reprint the Vendor Check

    Hi Experts, User Posted the vendor manual payment using F-58 Payment with Print out. System Voided some checks and gave the void reason code 02 - payment over flow. and system assign replacement check number. In the payment voucher system is printing

  • Purchase Order Driver Program

    Hi all Am using the Standard Smartform /SAPDII/SPP_ORDER  for my purchase order rather than the script MEDRUCK.Now please tell me what is the driver program i need to submit for /SAPDII/SPP_ORDER in NACE.Please Help Vijay

  • Performance Bottleneck at HIgh Loads

    Hi, We are currently load testing our web application and have been facing an issue that has ben bothering us for sometime now. If we load test the application at high load for sustained amounts of time, (around 2 hours), the performance suddenly dip

  • I can't comunicate with two fieldpoint chains from one pc

    I have two separate labview programs which use different serial ports (com8 & com9) to communicate with two separate sets of fieldpoint hardware. Each works fine on it's own. When I run both from the same PC, the second to start always receives a 'Ca