HTML Expression - condition

I have a search page with a report region showing top 10 departments.
The query I have used is :
select deptno, count(empno) countv
from emp
WHERE rownum < 11
GROUP BY deptno
order by deptno desc
If the count = 1, then clicking on the column(link), I would want to goto the details page, If the count >1 then I want to display the search list in the same page. The user would then click appropriate row to go to details page.
I tried creating using HTML expression, but URL can point to only one page - how do I specify the condition in html expression?
Is there any other way I can achieve this?
Thanks,

Apart from your link - problem : This query will not guarantee to deliver the top 10 departments...beceause the where is evaluated before the group and order by. You should use a in line view to solve this.
Roel

Similar Messages

  • Display PDF file in the Apex query report using HTML Expression

    Hi Folks,
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    <img src="#OWNER#.proc_display_document?p_id=#file_id#"/>
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) as
    s_mime_type varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as" 
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');      
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

    Hi Dimitri,
    I hope you can see HTML Expression code now. Thank You for responding.
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    [!--  img src="#OWNER#.proc_display_document?p_id=#file_id#" ]
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) **
    mimetype varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as"
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • Call to PL/SQL Stored Procedure in the HTML expression field

    Hi,
    I need to display an image in a report based on the value of the underlying field. (Y/N)
    I created a solution based on http://www.dba-oracle.com/t_easy_html_db_display_image_html_expression.htm
    Unfortunately this does not work for me. The PL/SQL written in the HTML expression field is not being executed. The result is something like : <img src="PKG_IMAGES.display_YN_checkmark_image?p_image=Y">
    What am I missing?
    Tx for your help.

    kcaluwae wrote:
    Hi,
    I need to display an image in a report based on the value of the underlying field. (Y/N)
    I created a solution based on http://www.dba-oracle.com/t_easy_html_db_display_image_html_expression.htm
    Unfortunately this does not work for me. The PL/SQL written in the HTML expression field is not being executed. The result is something like : <img src="PKG_IMAGES.display_YN_checkmark_image?p_image=Y">
    What am I missing?Ensure that the Display As Column Attribute for the report column is Standard Report Column.
    However, the linked article appears to be very out of date. If using APEX 3.1 or later, see About BLOB Support in Forms and Reports for a better alternative.
    There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well. (That might be an earlier version but it is still relevant to APEX 4.x.)

  • HTML Expressions and HTML

    I an using the column formatting HTML Expression: Ex:<i>#TITLE#</i><br>#PRESENTER#, #INST_NAME#
    This works just fine until I need additional HTML for one of the items. The HTML is in the database for the field TITLE and want to have that HTML displayed. This HTML does not display if I have the field in the HTML Expression. I need to keep these fields together to keep things lined up.
    The table entry looks like this: <s>Modeling of Blood Cell Populations </s> <font color="orange"> withdrawn</font> . The word withdrawn is included but not the formatting. If I do not use the HTML Expression the field display properly, but I need to keep the other fields display with the title.
    ( 1 )     10:00 AM     10:15 AM     download     Modeling of Blood Cell Populations withdrawn
    John Jones, Some College
    Can anyone assist?
    Joyce

    Sorry, I'm not really following this: could you show an example on apex.oracle.com, or post a screenshot somewhere? (Off the top of my head check the report column Display As property is "Standard Report Column", or that this is a Derived Column.)
    Also, please edit your post, wrapping the HTML in \...\ tags to stop it being interpreted by the forum software/browser. (http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ)
    Finally, the &lt;s&gt; and &lt;font&gt; elements have been deprecated since forever. It may have nothing to do with the problem, but it would be better practice to use modern mark-up, e.g.
    <div class="presentation">
      <cite class="withdrawn">#TITLE#<span class="wd">&amp;nbsp;withdrawn</span></cite>
      <span class="presenter">#PRESENTER#</span>, <span class="institution">#INST_NAME#</span>
    </div>styled with CSS:
    .presentation cite {
      display: block;
      font-style: italic;
    .presentation cite .wd {
      color: orange;
      font-style: normal;
    }

  • Security check in "HTML Expression" property?

    Hi,
    question for the gurus, because it's not logical for me how APEX behaves.
    I have the following report query:
    SELECT EMPLOYEE_ID
         , LAST_NAME
         , EMAIL
         , Apex_Item.Text(1, PHONE_NUMBER) AS PHONE_NUMBER_INPUT
         , PHONE_NUMBER
         , HIRE_DATE
      FROM EMPLOYEESFor the PHONE_NUMBER column I want to set the "HTML Expression" property to
    #PHONE_NUMBER_INPUT#For the PHONE_NUMBER_INPUT column, the "Show Column" property would be set to "No".
    What is the idea behind this construct? It would allow to make the column PHONE_NUMBER sortable by the actual column value, and not based on the string <INPUT ...> APEX generates with the Apex_item.text call.
    But the above trick doesn't work, it always returns NULL as soon as I reference a column where the value includes an "<INPUT..." in the column value. If a reference another column it works fine. Is there some security check built into the "HTML Expression" function?
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net New

    Scott,
    the problem doesn't seem to be related to the "HTML Expression" property. After reading the following thread Column link omits html tags
    I did some further testing and it looks like that whenever a report column is referenced with #COLUMN_NAME#, all tags which are between &lt; and > are stripped out. It doesn't have to be a valid HTML tag, &lt;abc> is also removed.
    See the last report at http://apex.oracle.com/pls/otn/f?p=45495:2 for an example.
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • HTML Expression and Highlights

    Hi.<p>
    I created a small People Search application. The last name and the first names where typed mixed case. (database is <b>9i</b>).<br>Examples would be<p>
    Anne Baker<br>
    George de Wolf<br>
    Gary VanBueren<p>
    The spec was to show them as they are and export them as they are to a csv but then sort properly.<p>
    I also had to highlight the search patterns.<p>
    So I queried both upper of the names, and the names are they are, showed the upper, hid the actual and enabled the sorts and used the HTML Expression property o upper to set the actual names (#LastName#). This took care of the proper sorting in additions to displaying the names as they were entered. <p>
    But using the &P_Var. as the Highlight word did not work when I used the HTML Expression property. Also the export would return the upper case values.<p>
    So I removed the upper case and HTML expression logic and hacked the anchor tag a little bit to get a value and display another value. I lost the href tag deliberately to avoid a link.<p>
    so the query would return something like <p>
    <a GEORGE DE WOLF>George de Wolf</a>. This would take care of the sorts and the export..<p>
    but the highlight would still not work.<p>
    So I coded the <span> tag in the query to highlight the pattern myself. <p>
    Is there an easy way of doing this. (instead of coding the span tag and hacking the <a> tag)<p>
    - Thanks<br>
    N

    When I use NULL as the value of a column in a Classic Report region and use the HTML Expression column attribute to construct the value using other columns via #COL# notation, the on-screen report works fine but to my surprise the CSV download doesn't use this value, it export the actual column value (which is NULL in this case).Not quite. It is not just a matter of line breaks, the actual column is just a placeholder, the column value is NULL but the HTML expression could combine multiple columns, see my original post.
    I guess there is no way to do this. Apex team - Could this (honor HTML expression in report export) be an enhancement for the next release? Thanks

  • Interactive report and HTML Expressions

    Currently I am using standard reports showing some icons using expression like:
    <img src="f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:APPLICATION_PROCESS=ShowIcon:::F105_BILD_ID:#GUI_ID#">
    I would like to recreate my page using the interactive report capabilities from APEX 3.1. I couldn't find the column formatting section in the interactive report however.
    How can I reproduce the current icons showing behaviour using an interactive report ?
    Thanks for help
    Valéry

    Hello Valery,
    You don't have the HTML Expressions section in an Interactive Report.
    However what you can do is include your img tag in your select statement directly. So you would have something like
    SELECT '<img src="f?p='||:APP_ID||':'||:APP_PAGE_ID||':'||:SESSION||':APPLICATION_PROCESS=ShowIcon:::F105_BILD_ID:'|| gui_id || '">' as col1
    FROM your_table
    Make sure your IR column is set to standard column and not Text.
    That should do it.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Standart report sorting with HTML expression in it

    hi,
    got a query with report links like +'<_a href="f?p=&APP_ID.:26:&APP_SESSION.:::26:P26_YEAR,P26_MONTH,P26_BACK,P26_STATUS,P26_PROJECT:&P22_YEAR.,&P22_MONTH.,22,0,'||id||'">'||saved||'</_a>'+
    with 'saved' being a numeric value, report column sorting does not work. any suggestions?
    simon

    Hi Simon,
    As you are outputting the entire HTML using SQL, you need include something at the beginning of the HTML that allows sorting to work on the correct values. I tend to use the "title" (tooltip) attribute and ensure that numbers are of equal length by padding them with zeros:
    '&lt; title="' || TO_CHAR(saved,'000000') || '" href = "' ..... etc
    {code}
    Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HTML DB Condition type Current page......

    Hi everybody,
    On a conditionnal processing in a Condition type :
    Current page ! = Page submitted. What does it mean ?
    Can you help me ?
    Thank you. Bye.

    I think this is a test to see if the current page was branched to by another page. In other words the page did not branch to itself. You can have page 1 be submitted and branch to page 2. On page 2 you can have the condition that the current page != to the page submitted. In this case 2 != 1 so the condition would evaluate to a true condition. If a page branched to itself, then 2 != 2 would be a false condition.
    As always if I am wrong, please correct me.
    Mike

  • Having trouble with report total row with expression based condition

    Hi,
    I have a simple SQL region that has 2 columns (country and pnl). I then had a request to display negative PNL in red. To do this I copied the Standard Alternating Row Colors report Template and changed the condition so that it uses one class (named "t16data") with a PL/SQL Expression condition NVL(#PNL#,0)<0
    Then, in the referencing page HTML header I added :
    <style>td.t16data{color:red} </style>
    For normal data rows it works fine. However, I also have a sum on PNL and the total row always shows red (even when it's a positive number).
    Any idea? Do I need to provide more information?
    Thanks

    My question about this is the other Dynamic VPN that is working has no static route.
    I added:
    route outside 10.10.10.0 255.255.255.248 xxx.xxx.xxx.xxx (where xxx.xxx.xxx.xxx is the IP of the non working remote IKE Peer)
    This had no effect.
    Looking at the two tunnels.  The working tunnel is using IKE IPSEC and the nonworking tunnel is using IKE IPsecOverNatT.  What have I entered that tells the VPN to use IPsecOverNatT?

  • Conditional Processing: Request is Contained within Expression 1

    I believe I have found a bug with the Process Conditional Processing logic, where "Request is Contained within Expression 1" is used.
    Here are three of the buttons that I have on my page:
    GET_RES_CIVIC_ADDR - This button is displayed among the Region Items (Region 2)
    CRE_RES_CIVIC_ADDR - This button is displayed among the Region Items (Region 2)
    ADD - Automatically created as part of a Tabular Form (Region 3 - Updateable Report).
    I have a process that is conditional on either GET_RES_CIVIC_ADDR or CRE_RES_CIVIC_ADDR being run (meaning the Process has its "Conditional Processing" "Condition Type" set to "Request Is Contained within Expression 1" and where "Expression 1" is set to "GET_RES_CIVIC_ADDR,CRE_RES_CIVIC_ADDR" (without the quotes).
    The problem I have encountered is that this Conditional Process also gets run if I submit the ADD Button. The reason being is that the word "ADD" is contained within the Expression 1 string "GET_RES_CIVIC_ADDR,CRE_RES_CIVIC_ADDR".
    Note that if I change the REQUEST value for these two Item Level Buttons to names that do not contain the word ADD, the problem is fixed.
    Is this a known bug? Or do I have to edit the value of Expression 1, so that each Button Name/Request Value is enclosed in quotes or the like?

    Scott,
    I was under the impression that the values in Expression 1 would be a list of comma delimited values (e.g. A,B,C and not ABC) and would be evaluated individually. However, you are correct. It is being evaluated as advertised.
    A note for others that have this problem - the evaluation of :REQUEST is Case Sensitive, so if the Item Level Button had been named 'Get_Res_Civic_Addr' (using Camel Case) instead of 'GET_RES_CIVIC_ADDR', (Upper Case), there would not have been a match with the 'ADD' Request and therefore the After-Submit process would not have been run by the ADD button.
    To prevent this in the future, we are going to standarise using the PL/SQL Expression Condition (checking :REQUEST) and also ensure that our Item Level Buttons "Request Value" is Camel Case (just an extra precaution).

  • Condition, Expression 2 Question

    Hi,
    I'm relatively new to ApEx, so I apologize if my question is light weight.
    One of the selections for condition type is "Value of Item in Expression 1 = Expression 2". I wanted to only display a button if 2 fields had the same value, and thought this condition type would work, but it didn't. After trying different combinations of syntax, etc. I came to the conclusion that it was expecting Expression 2 to be something different than I had in mind. I should have taken the condition type literally. It says 'Value of Item' in Expression 1, but just says '= Expression 2'. I take this to mean that you can put an item name in Expression 1 and ApEx will insert the value into Expression 1. But, Expression 2 should just be a literal.
    Am I correct in my thinking?
    If so, will something other than a literal work in Expression 2? If so, what will?
    Thanks, Tony

    Tony,
    It says 'Value of Item' in Expression 1, but just says '= Expression 2'. I take this to mean that you can put an item name in Expression 1 and ApEx will insert the value into Expression 1. But, Expression 2 should just be a literal.Correct. You can put the name of one item in Expression 1 and &P2_ITEM. (with trailing period) in Expression 2 but I think it's more straightforward to use a PL/SQL Expression condition:
    :P1_ITEM = :P2_ITEM
    Scott

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • How to conditionally put a percentage sign in a column in a report

    Background: In the past, our users have been provided with a spreadsheet of statistics that was created manually, by running a bunch of barely related queries, manually entering the data into the spreadsheet, adding formatting and headings, etc. They wanted this moved to APEX, and they wanted to be able to export it as one spreadsheet. The only way I could find to do this was to combine all the queries into one huge query.
    So I have a report of 22 unique queries unioned together. The third and fifth columns are percentages. I found Column format with percent ( % ) sign post that explained how to use the HTML Expression (under Column Attributes) to add a percentage sign (#COL03#%).
    This worked fine except for that in order to get the headings how they wanted them, I had to do something like:
    -statistical query-
    union all
    select '<b>HEADING ONE</b>', null, null, null, null from dual
    union all
    -statistical query-
    etc.
    The problem now is that I don't actually want the percentage sign in the heading rows. Is there a way to change the HTML Expression so it's conditional, and it only appends the percentage sign if the value in that row is not null? Or alternately, is there a way to append the percentage sign in the actual select statement, so I could go through each of my 22 queries and append it only when I know it's needed? A simple example of one of these queries is:
    select ''New Enrollees'' as a,
    (count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END)) as monthly,
    (((count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_MON_SUBMISSIONS)*100) as m,
    (count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END)) as YTD,
    (((count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_SUBMISSIONS)*100) as y
    from main
    where extract(year from rdate) = :P45_YEAR_SELECT
    Thanks in advance for your help!
    -Gaso
    Edited by: gaso on Feb 4, 2009 1:39 PM
    Edited by: gaso on Feb 9, 2009 4:39 AM

    why don't you add the percentage sign in the query itself, e.g. with a case statement to show it conditionally?

Maybe you are looking for

  • Color difference when using a different programs

    I find this very odd, but now that I am using multiple program within the Creative Suite I am beginning to notice color differences. For instance, if I use hex: #200add in Photoshop it renders a different blue then in Illustrator or InDesign. Why is

  • Appleworks on intel mac?

    I have an old ibook with disks, and I just bought a new imac. Although I am a huge mac fan, I am very disappointed to see that I have NO word processing program on my new mac. Is it not possible to use my old software disks to put appleworks on my ne

  • Serial number "not qualifying" for upgrade

    Everything works great through the PURCHASING process, but as soon as I try to use the expensive "upgrade" from ACROBAT PRO 9 to ACROBAT PRO XI, I'm told my Pro 9 SN doesn't qualify. Why? (Mac) FYI - "chat" is useless on a Sunday apparently. So much

  • Itunes can not sync apps with the iphone [name], because it can not determine which apps are installed on the iphone.

    After installing the latest Version of iTunes (10.5.1.42) on my Windows XPs PC it's not possible to sync my iPhone 3GS (not iOS 5!) any more - I get the error message above. It's possible to download music, apps, podcasts - but not possible to sync w

  • Downloading a subset of songs into Nano

    I have a large library of songs on my Itunes pc(8,000). I bought a Nano that holds 1500 songs. How do I quickly select the songs that I wanted loaded on the Nano. Surely I don't have to drag one at a time. Please help.