Javascript to call html region

Hi ,
I am trying to put apex sql report inside HTML tags using div, can anyone help me out how this can be achieved
Thanks in advance,

Hi,
Why you like do that?
If you have enabled partial refresh for report, table is already wrapped to div.
Div id is like report_43690456234770203_catch
Regards,
Jari

Similar Messages

  • How to pass sql query to html region

    Is it possible to pass the results of a sql query (say in a page process) to javascript in an html region on the same page?

    Anton,
    Thank you very much for your useful answer. Yes, the page item will work for a query that returns one row. I am not aware how to duplicate this functionality for a query that returns multiple rows.
    I am trying to use this method in order to send time series data to a third-party charting engine required to produce specific types of charts that HTML DB cannot build itself.
    I can cause the third-party chart server to build a chart on an HTML DB page with static data by using pure html or javascript. But I am not sure how to send the full time series to the server as I would say on a jsp page.

  • How to display the value of a javascript variable in a html region ?

    Hello,
    I need to display my page title or name in a html region.
    I added a script in the <title> section of the template header... :
    (thanks Andy : Get page name from page attributes ?
    <script type="text/javascript">
    var pageTitle = '#TITLE#';
    </script>... so I can use it in a javascript variable.
    But now I don't know how to display it in a html syntax..
    Thanks!
    Fanny

    ... so I can use it in a javascript variable.Don't see any reason to modify page templates to introduce an unnecessary global JS variable when the document property is already there. Display it using an appropriate HTML element, e.g <tt>h1</tt> if it's the overall page heading.
    <h1>
      <script type="text/javascript">
        document.write(document.title);
      </script>
    </h1>

  • (Solved) Calling a different page using HTML Region as a part of other page

    Hi All,
    I want to open a page as a part of other page as it is done using frames in HTML.
    For example :
    <html>
    <head>
    </head>
    <frameset cols="30%,*">
    <frame src="menu.html">
    <frame src="content.html">
    </frameset>
    </html>
    Now I want to use the HTML Region and try calling different page developed in the same application. How can I acheive this task.
    Hoping for a quick and easy solution for this.
    Thanks in advance.
    Regards
    Arif

    Once Agian Thanks Andrews
    http://www.dynamicdrive.com/dynamicindex17/iframessi2.
    htmThis web page i suppose is presently not available, atleast i'm not able to open it.
    Hope there are some more sites.
    I'm trying to search on Google but as I do not have much information about Java Script so cant identify the exact solution.
    Hoping to get some predeveloped JavScript that works with Internet Explorer and Mozilla Firefox atleast.
    Thanks once again.
    Regards
    Arif

  • Javascript error calling a bi 7.0 webapplication from a bsp application

    Hi everyone,
    This is the scenario we're facing a javascript error :
    Enterprise Portal is calling a custom bsp application ( via an iview in the enterprise portal ) in the bi system with a parameter "template_id" and a value, which is the technical name of a bi web application.
    The bsp application is evaluating the parameter by some custom code and creating a html page with a redirect or a maintenance message to the bi web application passed with the parameter "template_id".
    The html link to the bi web application is created according to this documentation :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/03d4ac801467e6e10000000a1553f6/content.htm
    Purpose of the bsp application :
    in the bi system there is a database table to maintain a flag for each webtemplate and infocube, which should not be called via the enterprise portal for a certain time ( some kind of maintenance switch ). The bsp application then decides to show a maintenance page for the called webtemplate or to send the redirect page to the client.
    The process described above is :
    working with the bi 7.01 sp7 in the bi ( enterprise portal sp22 ) in the productive system.
    working in the Q&A system bi 7.01 sp8 with bi 3.5 web applications.
    not working in the Q&A system bi 7.01 sp8 with bi 7.0 web applications.
    The javascript error calling bi 7.0 web applications is :
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET4.0C; .NET4.0E)
    Timestamp: Mon, 6 Jun 2011 09:11:04 UTC
    Message: Object doesn't support this property or method
    Line: 96
    Char: 11
    Code: 0
    URI: https://mlptb1.mlp-ag.com:58001/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=B_221_002_KUNDEN_POSTEN_AD
    We've opened a message. Support center is saying that this method isn't supported by sap. We should ommit the bsp application and the used functionality.
    Is there any way to find out, what is causing this object is missing ?
    Is there another way than a bsp application to use this custom maintenance function in the described system setup ?
    system components :
    production system
    SAP NetWeaver 7.0 Portal SP22
    SAP BI 7.01 SP 7
    q&a system
    SAP NetWeaver 7.0 Portal SP22
    SAP BI 7.01 SP 8
    Kind regards.
    Dirk

    Hello everyone,
    we did some further analysis on this problem und we think we found the problem.
    The error occurs while trying to execute the standard url for web templates inside a Enterprise Portal Frame, for example
    https://XXX:XXX/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=XXX
    While executing the URL a HTML-Page with some embeded Javascript-code is sent back to the browser.
    In this Javascrip-Code, the method-call "dsmObj.registerAll" leads to a script error in Internet Explorer.
    dsmObj.registerAll("pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/iViews/com.sap.ip.bi.bex", "GUSID:6FC9SuhGDPIMMLwOdeHEIg--_7WQud13yeLJDz2kYoQFSg--", "1307605928212");
    In SP7, the method "dsmObj.registerFullKey" is called instead of "dsmObj.registerAll". This has changed in SP8.
    dsmObj.registerFullKey("GUSID:iBPvyska9*xE_JBalkQG2g--YyKv2C3NToP0I79Mw7EO8w--", "1307606479963");
    The object "dsmObj" seems to reference the parent frame of the Enterprise Portal.
    Has anyone seen this before? Any ideas how we can fix this?
    Kind regards,
    Matthias
    Edited by: Matthias Keller on Jun 9, 2011 2:07 PM

  • How to load a large amount of HTML into HTML region?

    I am trying to display a clickable image map (HTML <map>) in a region. The HTML source for the image map is fairly large and will not fit in the Apex editor (HTTP 400 error when I Apply Changes). I would also rather not manage that much HTML in the Apex web editor. So I stored the code in a file and added it to my applications file storage.
    I have tried various methods of getting the HTML to load when the page is rendered. I tried a URL region, but that leads to all kinds of ACL/security issues that we do not want the customner to have to deal with. i also tried some PL/SQL:
    DECLARE
    l_file_id NUMBER;
    BEGIN
    SELECT id
    INTO l_file_id
    FROM APEX_APPLICATION_FILES
    WHERE filename = 'myhtml';
    APEX_UTIL.GET_FILE(
    p_file_id => l_file_id,
    p_inline => 'YES');
    END;
    But that just replaces the entire page, not just the region it's defined in (even when the HTML is without <head> etc).
    Various attampes wih #APP_IMAGES#myhtml and &APP_IMAGES.myhtml just give me the translation of the APP_IMAGES variable.
    So, how do I load a large chunk of HTML into a region dynamically at run time? I also need this to interact with APEX in the sense that JavaScript will set APEX variables and cause a SUBMIT when the use clicks on the image map.

    Hi Andy,
    ATD wrote:
    Does your HTML define the regions/points on the map using AREA tags?Yes. it is actually generated using MapSefrver from huge tables of SDO_GEOMETRY (Oracle Spatial).
    If so, you could define a report template that does this and use this for a report based on a table that has the settings for shape, coords, href etcHmm, the code (HTML map) is auto-generated so if I understand you correctly, this might be difficult. One of the HTML is approximately 180KB of text.
    I found a way to do this using dynamic PL/SQL. I created a new table that has a varchar filename and a CLOB for the file data. I then imported the HTML into the table using SQL Developer (copy&paste, nice!). I then created an HTML region and used the following:
    declare
    html clob;
    len number;
    st number;
    c number;
    begin
    select length(data)
    into len
    from FILES
    where name = 'state_query.html';
    st := 1;
    while len > 0
    loop
    if len > 32000 then
    c := 32000;
    else
    c := len;
    end if;
    select substr( data,st,c )
    into html
    from FILES
    where name = 'state_query.html';
    htp.p( html );
    st := st + c;
    len := len - c;
    end loop;
    end;
    Edited by: CoyoteTech on May 13, 2009 7:27 AM

  • How to Display PHP Output as Portlet in HTML Region using utl_http.request

    I wanted to be able to parse PHP functions to add more functionality to my Page. nothing fantasy, something simple like: http://phpsysinfo.sourceforge.net/phpsysinfo-dev/?template=classic
    Where the realtime values are retrieved from the OS. this represent some kind of problem to me, I know how to do it from Shell Script, Perl or PHP, but not from PL/SQL.
    Based on my experience using Oracle Portal, Portlets, I think we really can make use of the feature used in Portal called Web Clipping. [ This feature basically goes to some Site a retrieve part of the site to show in the current page]. Well the PL/SQL utility utl_http.request does something similar.
    Make sure your request page does not retrieve some headers because that would cause a problem in your page and will not show up.
    This is what I did:
    <b> 1.- </b> Grant Privileges to execute [ <b> utl_http.request </b> ] to the owner of your schema.
    login into the OracleXE / APEX as SYS then go to the Object Navigator, then click on packages, find the utl_http.request then click on it, later click on grant and select your schema owner for your applicaion.
    <b> 2.- </b> Logout as SYS then login as your application schema user. just to test the functionality go to the sql command then enter the following command and then click run:
    <b> select substr(utl_http.request('http://www.oracle.com/'),1, 255) from dual; </b>
    If your output is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Oracle 10g, Siebel, PeopleSoft | Oracle, The World's Largest Enterprise Software Company</title> <meta name="title" content="Enterprise Applications | Database | Fusio
    <font color='blue'> Wow It worked </font>, this really could be useful !!, If not go back to step 1 and check your permissions to execute, or perhaps your Internet connectivity.
    3.- Once we know the package works and we can retrieve content from the Internet. lets go to some of our pages add some HTML Region.
    4.- Create an item and put into the new region. the source will be SQL, For the purposes of my test the query to the Oracle Page failed, so I decided to give a shot with a simple PHP script with no headers.
    The internal server is: http://mytest.com/hello_world.php
    Where the content of the hello_world.php is:
    <?
    echo '"<b> Hello World </b> ";
    ?>
    This PHP works fine and display the basic Hello World. can be the same server or not, also noticed this can be another port perhaps using something like Ruby,Mason or Java.
    <b> 5.- </b> Finally in my Item the source type is SQL and looks like this:
    <b> select substr(utl_http.request('http://mytest.com/hello_world.php'),1, 255) from dual; </b>
    Apply the changes and run the page !!!
    Excelent It worked as expected. now you know how use utl_http.request to create webclipping in your OracleXE / APEX from remote pages, or how to use it to parse the output from CGI, Perl, PHP, Ruby or Java pages.
    Note: [ Just make sure to strip the headers or parse into a PL/SQL Procedure to clean then show ]
    Best Regards <b> Dino </b>.
    Brains R Like Books only work when they R Open.
    http://www.htmldbhosting.com/

    Sorry, from your post in the LabVIEW board I did not understand that it was the Output message that you were looking for.
    I thought you wanted the results from your test steps displayed on the user interface. 
    It is the “Output Panel” in the sequence editor that displays your output message, but I do not know if there is default Output panel activeX indicator for user interface that the TestStand engine would update automatically like it does the execution view.
    Maybe someone else knows 
    As also pointed out, the UI messages is your other option.
    The Output Message event number is 40 
    http://zone.ni.com/devzone/cda/epd/p/id/3879
    UIMsg_OutputMessages–(Value: 40) TestStand sends this message at periodic intervals when it holds references to output messages that calls to the OutputMessage.Post method queue. TestStand transfers the queued messages to an OutputMessages collection attached to the UIMessage.ActiveXData property for this event. An application that processes output messages should copy the output message references from the collection in UIMessage.ActiveXData to its own private OutputMessages collection by passing its private collection to the OutputMessages.CopyMessagesToCollection method. An application calls the Engine.NewOutputMessages method to create a private OutputMessage collection. TestStand generates this event only if the Engine.OutputMessagesEnabled property is True. Because there can be more than one handler for this event, the application should not modify the OutputMessages collection the UIMessage.ActiveXData property holds.
    Omar
    Message Edited by OmarGator on 10-09-2008 10:12 AM

  • Opening a Word document in a form layout html region

    Hi all,
    In an Interactive Report I use
    select '<img src="#WORKSPACE_IMAGES#'||package.f_get_document_type ( doc.id )||'" title="Document" width=20 height=20>'
    ) document
    from table
    to show an icon that eventually downloads (and shows) a word document.
    Now I have a form layout html region and I want to have the same icon\link to show a document.The document however is not in the same table as the rest of the page is based on.
    How can I show the document on this page?
    Kind Regards,
    Maurice
    Environment = Apex 4.0 database 11G
    Edited by: maurice.niezen on Aug 31, 2010 2:10 AM

    One way, create a hidden item, and return the value into it from your package (by having a computation that calls the function package.f_get_document_type(:P1_DOC_ID) . Let's say it's called :P1_DOC_TYPE
    There's a new item type in Apex 4, which is Display Image.
    When you get to settings in the item creation wizard, specify what the image is based on. From there, you can set it to be 'Image URL stored in Page item Value. Then on the source page, you can just specify the URL, #WORKSPACE_IMAGES#&P1_DOC_TYPE.

  • How to add a link to html region to fire a dynamic action?

    Hi, guys:
    I need to add a hyper link to a html region (I wish it could be a button :( ) , the value of items in this region is loaded by a pl/sql process before loading header. And this link needs to fire a dynamic action to update database. I know how to add a hyper link to this region, but how to set this link so I can fire a dynamic action by clicking this link, could anyone give me a hint?
    Thanks a lot in advance.
    Sam
    Edited by: lxiscas on Apr 11, 2013 5:04 PM

    Hi, Jorge:
    Thanks for your reply. I cannot use updateRec, I have to use my own PL/SQL procedure. I tried to use similar way as people set dynamic action for modal page.
    I set column link for ncic_approve_link
    SELECT SOR_ALIAS.ALIAS_ID,
    SOR_ALIAS.OFFENDER_ID,
    SOR_ALIAS.FIRST_NAME|| ' '|| SOR_ALIAS.MIDDLE_NAME|| ' '|| SOR_ALIAS.LAST_NAME || ' ' ||  SOR_ALIAS.SIR_NAME   AS " Alias Name ",
    NVL(SOR_ALIAS.NICKNAME, 'No Nick names ') AS "Nick Name",
    (case when SOR_ALIAS.ncic_verify_date is null then 'NCIC' else null end) ncic_approve_link
    FROM SOR_ALIAS
    WHERE SOR_ALIAS.OFFENDER_ID    = :p216_detail
    AND SOR_ALIAS.ADMIN_VALIDATED IS NOT NULL
    AND upper(SOR_ALIAS.STATUS)    = upper('active')the link attributes is
    onclick="return false;" class="alias_ncic" title="NCIC Approve"then I pass two values to two hidden variables:
    P216_H_NCIC_APPROVE_TABLE_NAME--->'SOR_ALIAS'
    P216_H_NCIC_APPROVE_KEY_VALUE--->#ALIAS_ID#
    and I declare a dynamic action to execute PL/SQl code as :
    event: click
    selection type: JQuery seclector
    JQuery selector: a.alias_ncic
    declare
    begin
      sor_admin.update_NCIC_verify_date(:P216_H_NCIC_APPROVE_TABLE_NAME, :P216_H_NCIC_APPROVE_KEY_VALUE);
    end;However, the PL/SQL was called but raised exception that both the parameters are null. It looks when user click the column link, the value is not passed to hidden items. Could you help me on this?
    APEX 4.1
    Oracle 11G R2
    Thanks.
    Sam
    Edited by: lxiscas on Apr 29, 2013 10:00 AM
    Edited by: lxiscas on Apr 29, 2013 10:01 AM

  • Use apex_util.get_blob_file_src in HTML region as a source of a PDF file

    Hello,
    How to make apex_util.get_blob_file_src servers as a src attribute of HTML Tag in an HTML region source ??
    my code :
    <div style="">
    <embed height="100%" width="100%" name="embed_content" src="apex_util.get_blob_file_src('P126_FILE',FILE_id)" type="application/pdf" />
    </div>So, I have PDF file in Blob. But The source here does not get rendered... What SRC do I have to use ??
    Regards,
    Fateh

    Hi Fateh,
    How to make apex_util.get_blob_file_src servers as a src attribute of HTML Tag in an HTML region source ??my code :
    <div style="">
    <embed height="100%" width="100%" name="embed_content" src="apex_util.get_blob_file_src('P126_FILE',FILE_id)" type="application/pdf" />
    </div>So, I have PDF file in Blob. But The source here does not get rendered... What SRC do I have to use ??>
    Please see the example here http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDICGDA.
        THEN '<img src="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'" />' The API gets called in a PL/SQL block, not embedded into a HTML tag.
    Cheers,

  • Display word/pdf document in the HTML region or report

    Hi,
    How to display blob content stored in a table in HTML region or report region.
    I already have a process to display the image content.
    But my question here is how to display word/pdf document within the html region so that the user can read the document without downloading it.
    Any suggestions/solutions would be of great help.
    Thanks in advance...
    Thanks,
    Ramesh P.

    I was dead wrong.
    The display of images from BLOB is a special case because APEX provides a Display Image item type.
    Moreover, HTP/HTF packages also do not provide for handling of BLOB content. So AJAX cannot be used.
    Which implies that the only way to get binary content, other than images, is with the use of a WPG_DOCLOAD.DOWNLOAD_FILE call.
    This in turn implies that it may not be feasible to "inject" the BLOB into an exist HTML DOM in the Browser.
    Regards,

  • Embed PDF file in HTML region

    Hi There
    I have a simple report - with a link to view an underlying document. The document will be displayed on a seperate page with one HTML region. Say the file to display is statement.pdf and it is has already been uploaded to apex images. There is a hidden field P3_FILENAME on the display page. This gets set from the report. On the HTML region:
    <div style="">
    <embed height="600" width="1200" name="Statement" src="#WORKSPACE_IMAGES#&P3_FILENAME." type="application/pdf" />
    </div>but it does not work. However, if I simply do this and 'run' the page - it displays fine.
    <div style="">
    <embed height="600" width="1200" name="Statement" src="#WORKSPACE_IMAGES#statement.pdf" type="application/pdf" />
    </div>Looking at the source of the resultant failing page I can see that the values were correctly set.
    Any ideas?
    thanks
    P

    I think the HTML is looking for the explicit &P3_FILENAME. and can't find it because it is being referenced through the HTML rendering engine rather than the PL/SQL engine which would handle the variable substitution.
    Try creating a PL/SQL region where you write out the div tags as strings using DBMS_OUTPUT.PUT_LINE. I use this to create some rather complicated reports and it works great for letting me do variable substitution amongst my HTML. Here's a simple example (mine's a procedure I call to feed in page variables):
    create or replace PROCEDURE PROC_DASH_SAFETY(x_org NUMBER, x_dt DATE)
    AS
      v_dt_disp        VARCHAR2(15);
      v_dt             DATE           := x_dt;
      v_org_id         NUMBER         := x_org;
      v_fact_id        NUMBER;
      v_org_nm         VARCHAR2(47);
      v_org_tz         VARCHAR2(4);
      ontime           VARCHAR2(47);
      v_saf_ct         PLS_INTEGER    := 0;
      v_eff_ct         PLS_INTEGER    := 0;
      saf_aud_t        NUMBER;
      saf_aud_a        NUMBER;
      eqp_aud_t        NUMBER;
      eqp_aud_a        NUMBER;
      saf_chk_t        NUMBER;
      saf_chk_a        NUMBER;
      saf_loss         NUMBER;
      eff_mpg_t        NUMBER;
      eff_mpg_a        NUMBER;
      eff_idl_t        NUMBER;
      eff_idl_a        NUMBER;
      eff_brk_t        NUMBER;
      eff_brk_a        NUMBER;
      pm_tgt_pct       NUMBER;
      pm_ct            INTEGER;
      pm_act_pct       NUMBER;
      pm_done          NUMBER;
      pm_ovrdue        NUMBER;
    begin  -- 100
      select ORG_NM, TZ into v_org_nm, v_org_tz from ORG_ENTITIES
       where ORG_ID = v_org_id;
      v_dt_disp   :=  to_char(v_dt,'MM/DD/YYYY');
      select CASE WHEN v_org_tz = 'MST' and sysdate - v_dt < 33/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'MDT' and sysdate - v_dt < 33/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'MST' and sysdate - v_dt >= 33/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'MDT' and sysdate - v_dt >= 33/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'CST' and sysdate - v_dt < 32/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'CDT' and sysdate - v_dt < 32/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'CST' and sysdate - v_dt >= 32/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'CDT' and sysdate - v_dt >= 32/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'EST' and sysdate - v_dt < 31/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'EDT' and sysdate - v_dt < 31/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'EST' and sysdate - v_dt >= 31/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'EDT' and sysdate - v_dt >= 31/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'PST' and sysdate - v_dt < 34/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'PDT' and sysdate - v_dt < 34/24
                     THEN '<span class="grn">Yes</span>'
                WHEN v_org_tz = 'PST' and sysdate - v_dt >= 34/24
                     THEN '<span class="red">No</span>'
                WHEN v_org_tz = 'PDT' and sysdate - v_dt >= 34/24
                     THEN '<span class="red">No</span>'
                ELSE '<span class="red">No</span>'
           END as PRINT_TIME
      into ontime
      from dual;
      htp.p('<p class="lgl">Dashboard information is confidential.  Refer to your employee handbook for confidentiality guidelines.</p>');
      --htp.p('<p>'|| v_org_nm ||' on '|| v_dt_disp ||'</p>');
      htp.p('<table border="0" cellpadding="0" cellspacing="0" summary="Run Information" width="800">');
          htp.p('<tr><td>Dashboard for '|| v_org_nm ||' on '|| v_dt_disp ||'</td><td> </td>');
          htp.p('<td>Dashboard run on time? '|| ontime ||'</td></tr>');
      htp.p('</table>');
      htp.p('<table border="3" cellpadding="0" cellspacing="0" summary="Daily Dashboard">');
      --Safety
      htp.p('<tr><td><table border="0" cellpadding="0" cellspacing="0" summary="Safety Information" width="400">');
      select COUNT(ID) into v_saf_ct from DASHBOARD_AUDITS
       where DATE_INDEX = v_dt and ORG_ID = v_org_id;
          htp.p('<tr><th><div title="Safety">Safety</div></th><td class="c">Target</td>');
              htp.p('<td class="c">Actual</td><td class="c">%</td>');
              htp.p('<td style="text-decoration: underline;">Loss Free Day?</td></tr>');
      IF v_saf_ct = 1 THEN
        select LOSS into saf_loss from DASHBOARD_AUDITS
         where DATE_INDEX = v_dt and ORG_ID = v_org_id;
        select AUDIT_TARGET, AUDIT_ACTUAL, CHKRD_TARGET, CHKRD_ACTUAL, MECH_TARGET, MECH_ACTUAL
          into saf_aud_t, saf_aud_a, saf_chk_t, saf_chk_a, eqp_aud_t, eqp_aud_a
          from DASHBOARD_AUDITS
         where DATE_INDEX = v_dt and ORG_ID = v_org_id;
    ----Safety Audits
        IF saf_aud_t > 0 THEN
          htp.p('<tr><td>  Safety Audits</td><td class="c">'|| saf_aud_t ||'</td>');
              htp.p('<td class="c">'||saf_aud_a||'</td>');
            IF ROUND(saf_aud_a*100/saf_aud_t,2) >= 100 THEN
              htp.p('<td class="cgr">'||ROUND(saf_aud_a*100/saf_aud_t,2)||'%</td>');
            ELSIF ROUND(saf_aud_a*100/saf_aud_t,2) < 100 THEN
              htp.p('<td class="crd">'||ROUND(saf_aud_a*100/saf_aud_t,2)||'%</td>');
            ELSE
              htp.p('<td class="crd">-</td>');
            END IF;
          ELSE
          htp.p('<tr><td>  Safety Audits</td><td class="c">No Audit Target set</td>');
              htp.p('<td class="c">'||saf_aud_a||'</td><td class="c">-</td>');
          END IF;
          IF saf_loss = 1 THEN
              htp.p('<td class="cgr">Yes</td></tr>');
          ELSE
              htp.p('<td class="crd">No</td></tr>');
          END IF;
    ----Equipment Audits
        --eqp_aud_t        := 0;
        --eqp_aud_a        := 0;
        IF eqp_aud_t > 0 THEN
          htp.p('<tr><td>  Equipment Audits</td><td class="c">'||eqp_aud_t||'</td>');
              htp.p('<td class="c">'||eqp_aud_a||'</td>');
            IF ROUND(eqp_aud_a*100/eqp_aud_t,2) >= 100 THEN
              htp.p('<td class="cgr">'||ROUND(eqp_aud_a*100/eqp_aud_t,2)||'%</td></tr>');
            ELSIF ROUND(eqp_aud_a*100/eqp_aud_t,2) < 100 THEN
              htp.p('<td class="crd">'||ROUND(eqp_aud_a*100/eqp_aud_t,2)||'%</td></tr>');
            ELSE
              htp.p('<td class="crd">-</td></tr>');
            END IF;
          ELSE
          htp.p('<tr><td>  Equipment Audits</td><td class="c">No Equipment Audits Target Set</td>');
              htp.p('<td class="c">'||eqp_aud_a||'</td><td class="c">-</td>');
          END IF;
    ----Checkrides
        IF saf_chk_t > 0 THEN
          htp.p('<tr><td>  Check Rides</td><td class="c">'||saf_chk_t||'</td>');
              htp.p('<td class="c">'||saf_chk_a||'</td>');
            IF ROUND(saf_chk_a*100/saf_chk_t,2) >= 100 THEN
              htp.p('<td class="cgr">'||ROUND(saf_chk_a*100/saf_chk_t,2)||'%</td></tr>');
            ELSIF ROUND(saf_chk_a*100/saf_chk_t,2) < 100 THEN
              htp.p('<td class="crd">'||ROUND(saf_chk_a*100/saf_chk_t,2)||'%</td></tr>');
            ELSE
              htp.p('<td class="crd">-</td></tr>');
            END IF;
          ELSE
          htp.p('<tr><td>  Check Rides</td><td class="c">No Checkride Target Set</td>');
              htp.p('<td class="c">'||saf_chk_a||'</td><td class="c">-</td>');
          END IF;
      ELSE
          htp.p('<tr><td colspan="4">This information has not been recorded.</td></tr>');
      END IF;
      htp.p('</table></td>');
      select COUNT(ID) into v_eff_ct from VF_TARGET_PERF
         where ORG_ID = v_org_id and v_dt between BEGIN_DATE and NVL(END_DATE,sysdate);
      IF v_eff_ct = 1 THEN
        select MPG, IDLE_TIME, HARD_BRAKES into eff_mpg_t, eff_idl_t, eff_brk_t
          from VF_TARGET_PERF
         where ORG_ID = v_org_id and v_dt between BEGIN_DATE and NVL(END_DATE,sysdate);
      ELSE
        eff_mpg_t        := 0;
        eff_idl_t        := 0;
        eff_brk_t        := 0;
      END IF;
      select SUM(TRIP_DISTANCE)/SUM(TRIP_FUEL), SUM(HARD_BRAKE_COUNT),
              SUM(IDLE_TIME)/SUM(TRIP_TIME)*100
        into eff_mpg_a, eff_brk_a, eff_idl_a
        from PEOPLENETIF.TRIP_DATA
       where TRUNC(TRIPSTART_TIMESTAMP) = v_dt-1
         and VEHICLE_LABEL IN
             (select EQUIP_TAG from EQUIPMENT
               WHERE ORG_ID = v_org_id and EQUIP_TYPE_ID = 1)
         and TRIP_FUEL > 0 AND DRIVING_MPG <= 10;
      htp.p('<td><table border="0" cellpadding="0" cellspacing="0" summary="Performance" width="400">');
          htp.p('<tr><th>Efficiency</th><td class="c">Target</td>');
          htp.p('<td class="c">Actual</td><td class="c">%</td>');
              htp.p('<td class="c"> </td><td class="c"> </td></tr>');
    ------MPG
          htp.p('<tr><td>  MPG</td><td class="c">'||eff_mpg_t||'</td>');
              htp.p('<td class="c">'||ROUND(eff_mpg_a,2)||'</td>');
      IF eff_mpg_t > 0 THEN
        IF ROUND(eff_mpg_a/eff_mpg_t*100,1) >= 100 THEN
              htp.p('<td class="cgr">'||ROUND(eff_mpg_a/eff_mpg_t*100,1)||'%</td>');
        ELSE
              htp.p('<td class="crd">'||ROUND(eff_mpg_a/eff_mpg_t*100,1)||'%</td>');
        END IF;
      ELSE
              htp.p('<td class="c">-</td>');
      END IF;
              htp.p('<td class="c"> </td><td class="c"> </td></tr>');
    ------Idle Time
          htp.p('<tr><td>  Idle Time</td><td class="c">'||eff_idl_t||'</td>');
              htp.p('<td class="c">'||ROUND(eff_idl_a,2)||'</td>');
      IF eff_idl_t > 0 THEN
        IF ROUND(eff_idl_a/eff_idl_t*100,1) > 100 THEN
              htp.p('<td class="crd">'||ROUND(eff_idl_a/eff_idl_t*100,1)||'%</td>');
        ELSE
              htp.p('<td class="cgr">'||ROUND(eff_idl_a/eff_idl_t*100,1)||'%</td>');
        END IF;
      ELSE
              htp.p('<td class="cgr">-</td>');
      END IF;
              htp.p('<td class="c" colspan="2">PM''s</td></tr>');
    ------Hard Brakes
          htp.p('<tr><td>  Hard Brakes</td><td class="c">'||eff_brk_t||'</td>');
              htp.p('<td class="c">'||ROUND(eff_brk_a,0)||'</td>');
              --htp.p('<td>'||ROUND(eff_brk_a/eff_brk_t,1)||'%</td>');
              htp.p('<td class="c">-</td>');
              htp.p('<td class="cu">Complete</td><td class="cu">Overdue</td></tr>');
    ------Preventative Maintenance
      select COUNT(ID) into pm_ct from DASHBOARD_PM
       where ORG_ID = v_org_id and DATE_INDEX = v_dt;
      IF pm_ct = 1 THEN
        select PM_TARGET into pm_tgt_pct from PM_TARGETS
         where ORG_ID = v_org_id and v_dt >= START_DATE and v_dt <= NVL(END_DATE,sysdate);
        select PM_COMPLETE, PM_DUE into pm_done, pm_ovrdue
          from DASHBOARD_PM where ORG_ID = v_org_id and DATE_INDEX = v_dt;
        IF pm_ovrdue = 0 THEN
          pm_act_pct       := 100;
        ELSIF pm_done > 0 THEN
          pm_act_pct       := ROUND((pm_done-pm_ovrdue)/pm_done*100,1);
        ELSE
          pm_act_pct       := 0;
        END IF;
          htp.p('<tr><td>  PM Currency</td><td class="c">'||ROUND(pm_tgt_pct,1)||'%</td>');
              htp.p('<td class="c">'||ROUND(pm_act_pct,1)||'%</td>');
        IF pm_tgt_pct > 0 THEN
          IF ROUND(pm_act_pct-pm_tgt_pct,1) < 0 THEN
              htp.p('<td class="crd">'||ROUND(pm_act_pct-pm_tgt_pct,1)||'%</td>');
          ELSE
              htp.p('<td class="cgr">'||ROUND(pm_act_pct-pm_tgt_pct,1)||'%</td>');
          END IF;
        ELSE
              htp.p('<td class="crd">Set Target!</td>');
        END IF;
              htp.p('<td class="c">'||pm_done||'</td><td class="c">'||pm_ovrdue||'</td></tr>');
      ELSE
          htp.p('<tr><td>  PM Currency</td><td class="c">- %</td>');
              htp.p('<td class="c">- %</td>');
              htp.p('<td class="cgr">Enter PMs!</td>');
              htp.p('<td class="crd">- %</td>');
              htp.p('<td class="c">--</td><td class="c">--</td></tr>');
      END IF;
      htp.p('</table></td></tr>');
      EXCEPTION
        when VALUE_ERROR then
          dbms_output.put_line('VALUE_ERROR exception raised');
    end;
    /

  • How to Convert Variable containing HTML to be read as HTML in HTML region

    To understand the question, I have a table storing generated HTML by user and report type:
    USER      | REPORT_TYPE | HTML_GENERATED
    ----------------------------------------------------------------------------------------|
    TEST_USER |   TEST      | <HTML><head><title></title></head><BODY>TEST</BODY></HTML>   |On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
    SELECT HTML_GENERATED into :P2_HTML
    from LN_DOCUMENT_LABELS
    where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package.
    There exists a single Item on the page to store the variable into:
    P2_HTML     (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
    &P2_HTML.The result simply displays the HTML code:
    <HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
    TEST

    KylePN wrote:
    To understand the question, I have a table storing generated HTML by user and report type:
    USER      | REPORT_TYPE | HTML_GENERATED
    ----------------------------------------------------------------------------------------|
    TEST_USER |   TEST      | <HTML><head><title></title></head><BODY>TEST</BODY></HTML>   |
    Hopefully that's just poorly chosen sample HTML? APEX page templates already include those elements. Trying to output a complete HTML document inside an APEX page generally results in a mangled, inoperative mess.
    On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
    SELECT HTML_GENERATED into :P2_HTML
    from LN_DOCUMENT_LABELS
    where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package. In APEX it's not necessarily a good idea. Why use this approach rather than existing APEX features?
    There exists a single Item on the page to store the variable into:
    P2_HTML     (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
    &P2_HTML.The result simply displays the HTML code:
    <HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
    TEST
    Hidden page items these will always be escaped when referenced as static text substitution strings. (You may indeed have done this in previous versions of APEX at some point in the past, but there have been incremental restrictions introduced in several recent APEX versions.)
    Instead of a hidden page item, use an application item, or a Display Only page item with display Condition set to Never.

  • Using bind variables in HTML Region source

    <nl>
    http://apex.oracle.com/pls/apex/f?p=49417:1   workspace: SVK demo/demo
    I am having problems incorporating an item variable into a string of embedded html that should popup a modal video when the button is pressed.
    Item 1 works fine and that is what I want to accomplish with item 2, but when I pass :p1_url, it does not work even though the contents of the two items text areas equivalent.

    svk1965 wrote:
    If you look at my app, you'll see what I am attempting. Click on the button "Pass Hardcoded URLs in Variable to HTML Region" and a modal video will pop up. The goal is to display video in a modal window. The first example in my app works just fine. It is the second one that is causing me problems. BTW - Sequence 18 in the second DA does the same thing as Sequence 10 in the first - and it does work there so I am not sure that removing it is the right thing to do. I am not trying to set a region value per se, but populate the region source and sequence 10 does just that. So I don't think it is "useless" as you say.I can't see anything in the documentation or any previous posts here that indicates that DAs are supposed to work that way. If you can point me to some I'd like to see it. Which is not to say I like the idea. Plays too fast and loose with terms and concepts.
    Rather than trying to use a "Set Value" DA, my understanding would be to manipulate the region content via an "Execute JavaScript Code" DA, which works exactly as intended.
    I'll have to investigate this DA behaviour with a simpler example that doesn't involve hidden regions and Dynamic Acrion plugins.

  • How to call HTML page through JSP ?

    i want to know Hw to call Automaticly a HTML page through JSP.
    example :-
    have u seen yahoo login wen u put your ID & pass & Clock on login button it will chack ID & pass in the database & if it is correct then It will call A Mail Home Page.
    that's same i want to do.
    i have a jsp page which chacks the userID & Pass & call the first.html page
    but i dont know how to call html page automaticly.
    Any one can help me
    what i think is this
    tell me is it right or not
    suppose i have made a variable
    String add = "first.html"
    after chacking userID & pass
    if(idpass == true)
    add;
    if(idpass == false)
    erre;
    it will work or not pl tell me

    If you do the redirect with javascript, the user cannot resubmit his login when he presses the refresh button. When he does press refresh, he only refreshes the redirect, not the form post that was before it. When he presses back the redirect will also kick him back in stead of going back to the login page. A simple javascript redirect page would look like this:
    <html>
    <body onload="document.location.href='myhtmlpage.htm';">
    </body>
    </html>But that is only if you care about resubmits of course.

Maybe you are looking for

  • Stuck on 'Fixed' ADSL and no help from overseas ca...

    After trying 3 times to get some sense from an overseas call centre, I am now trying this forum in the hopes that a moderator can help as I have heard great things about them! I am obviously trying to get the fastest broadband speed possible for my l

  • 5530 XM would not connect to wifi

    I just got my new nokia 5530 XM yesterday, and I've been trying to connect to wifi since i got it, but it would just not connect. it does detect my WLAN but after I enter the "Pre-Shared key" it says "unable to connect, WLAN not found" I already try 

  • Clearing the Brush in ACR

    One of the things I don't like is that when invoking the brush, there is no way short of going over all the settings returning them to -0- by hand. I at first thought the clear button did that but it only clears the image. Am I missing something? If

  • Why is there an arrangement button in Displays when I don't have an external display attached??

    Why is there an arrangement button in Displays when I don't have an external display attached to my MacBook Pro?

  • Logic Pro 9 - BOX vs Mac AppStore

    Hello! I have bought BOX version of Logic Studio 9. Do You know, I can download Logic Pro 9 from Mac AppStore for free now?