APEX HTML REGION

Hi,
I am trying to place two HTML region, that play two different youtube videos, however only 1 shows.
My page consists of the following:
Display Point: Region Position 01
10
Open P1/P2 Calls
Flash Chart
20
Contracts By Country
Flash Chart (Column 2)
Display Point: Region Position 02
30
CSD Monthly Meeting
HTML
40
   Spare Parts
HTML (Column 2)
Any ideas as to why the other region does not display, i tried to mess around with the layout, but something always goes missing, i guess there is a limitation of the page itself?

Hi,
I've no idea how you try to display your youtube videos, but you can add more than one video if you embed them as iframes.
Check my blog:
Vincent Deelen: Embedding media in your APEX application
Regards,
Vincent
http://vincentdeelen.blogspot.com

Similar Messages

  • Cannot get an Apex HTML region with table with a background image to resize image to fit table

    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    Thanks in advance!
    Geert

    Geert01 wrote:
    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    This is a workaround. What's your real goal? Why do you want to do this?
    What browser(s)/version(s) are you using? All current browser versions have support for CSS3 background sizing which is the proper way to do this.

  • Html region print report in APEX 3.0

    Hi all!
    I have some HTML regions on some pages of my application.
    Do you know how to receive print reports of this regions in some formats e.g. PDF, EXCEL, HTML, rtf ?
    Is't any idea or any link ?
    Regards,
    Roman

    Hi all!
    I have some HTML regions on some pages of my application.
    Do you know how to receive print reports of this regions in some formats e.g. PDF, EXCEL, HTML, rtf ?
    Is't any idea or any link ?
    Regards,
    Roman

  • HEADER AND FOOTER IN HTML REGION

    I want to create a repeatable HTML Header (not an ApEx region Header) for a HTML region as described in
    http://www.html4newbies.com/header_footer_tip.php
    I want to include the header at different points in my HTML region
    It says that you need to save the Header in an external file and then reference it using the line
    <!--#include file="header.html" -->
    Can you do this in ApEx? I've uploaded the file with the header code into ApEx but how do I reference it? I've tried
    <!--#include file="#WORKSPACE_IMAGE#header.html" -->
    but it doesn't recognize it.
    Or is there a better way to do it?
    regards
    Paul P

    Can a shortcut be plugged in the middle of report output?
    The problem I'm grappling with is the page setup for a report prior to printing.
    If I use a template, the header will still appear only once if the report is large and pagination is turned off.
    Is the only way to define a "page" in ApEx through Pagination?
    If I have a report with no pagination set and the number of rows set to, say 10000 and I want to print off the report, how would I place a page header or footer every 66 lines (i.e. simulating portrait on A4)?
    Am I using the wrong application for this?
    regards
    Paul

  • Display image in HTML region???

    I made blank page, and on that page I made html region. Then I go to the Shared Components>Images Create and Upload the image DMD.gif
    to the Application 106, that the Application with which I'm working.I trying to put that image to the html region.
    In html region in Source I put this code, but it doesn't working:
    .<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    .<html xmlns="http://www.w3.org/1999/xhtml">
    .<head>
    .<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    .<title>Untitled Document</title>
    .</head>
    .<body>
    /img src="/i/DMD.gif" align="top"/
    .</body>
    .</html>
    I'm workin with Application Express 2.1!
    Edited by: user10187476 on Aug 27, 2008 2:35 AM

    In the HTML Region just put
    &lt;img src="#WORKSPACE_IMAGES#DMD.gif">
    or if you associated the image with the application
    &lt;img src="#APP_IMAGES#DMD.gif">
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • 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 create a Hyperlink  from HTML region

    How can I create a Hyperlink to another site from an html region in an apex page. It should be something simple, but I could not find it
    Please help
    George

    Have a look here:
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    There are lots of examples that may be usefull for you.
    Denes Kubicek

  • Special Characters in a HTML region

    I recently upgraded from HTMLDB 2.0 to APEX 2.2 and I'm having trouble with some special characters.<br>
    <br>
    I have HTML region in which I display a hidden item. The hidden item (P1_TEST) has the following value:<br>
    <br>
    STRING1&lt;br&gt;STRING2&lt;br&gt;STRING3&lt;br&gt;<br>
    <br>
    The region source has a single reference to the hidden item:<br>
    <br>
    &P1_TEST. <- the period is there. :)<br>
    <br>
    In HTMLDB 2.0 the display in the HTML region would render the region as<br>
    <br>
    STRING1<br>
    STRING2<br>
    STRING3<br>
    <br>
    In APEX 2.2, the region is rendered as<br>
    <br>
    STRING1&lt;br&gt;STRING2&lt;br&gt;STRING3&lt;br&gt;<br>
    <br>
    which is obviously not what I want. <br>
    <br>
    Any ideas anybody? I must be missing something simple. :)<br>
    <br>
    Thanks, Kent

    Kent - This is explained here: Re: Computed Region TItles being Escaped in Apex 2.2 You can use an application item instead of a hidden page item as a quick solution. To continue to use a page item you can make its display type Display as Text (does not save state) and set its display condition to Never.
    Although this change from 2.0 to 2.2 necessitates this type of inconvenient program modification, the benefit is that a cross-site scripting vulnerability that existed in your application will now be corrected.
    Scott

  • 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

  • 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 dynamic info in html region?

    Is it possible to use the output of a query in the source area of an html region?
    I'd like to display some data in the source I have in the html region of a page, but I can't find any documentation on how to do that.

    Hi,
    You have to create a dynamic pl/sql region and use PL/SQL and the Oracle Web toolkit (i.e. htp/htf packages). Also you can reference session state using variables bind (:MY_ITEM) syntax.
    Example:
    declare
      my_date varchar2(20);
    begin
      select to_char(sysdate, 'dd-Mon-yyyy')
      into my_date
      from dual;
       htp.p('Actual date:'|| my_date);
    end;Hope that helps,
    Paulo Vale
    http://apex-notes.blogspot.com

Maybe you are looking for

  • How do I set up two different Itunes accounts on the same computer

    I have one PC laptop and my daughter and I both have IPhone 4's.  I want to sync both phones using the same computer but want totally different accounts so that I don't have her music, aps, etc and vice versa.  I've tried this many many times and can

  • Error in Inbound JMS adapter (ESB project)

    Hello all, I am trying out a sample ESB application, where an ESB service is listening on a JMS topic (OEMS database persistence) for new employee notifications. Upon receiving the message, the service will invoke a stored procedure to insert a recor

  • Email folders

    How do I create a new email folder in icloud.com?

  • Main screen gray - external display works

    Hi, My PB G4 17" 1.0 GHz has a problem with its main screen. However it is still lit, it doesn't show anything. I can still operate the brightness and see the screen become more bright or dim. When I attach a second display, I see video there. So the

  • Warehouse RF and 2 step picking

    Hi Guys, I have set up wm mobile in ecc 6.0 and also have 2 step TO's working manually but can't get them to work with a scanner. I have one storage type one side of the road and one the other but they all form part of the same warehouse in SAP. They