Template Condition based on PL/SQL Expression

Hi everybody!
I need some help in conditional formating. Depending on the value of a column I want to display it with a diffrent background-color.
I copied the template Standard, ALternating Rows to a diffrent name, placed
<td class="t5data" headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# style="background-color:#f00;"> #COLUMN_VALUE# </td>
as template 1 , selected Use Based on PL/SQL Expression and as an expression I used for testing
1=1
As expected all rows are displayed in red.
Now I changed the expression to
'#CHARGE#' ='-'
but it the corresponding rows were not displayed with a red background . Changing to
'#CHARGE#' !='-'
made all rows be red ( such -, too).
Where is my fault?
Thanks for helping
regards
Petra
Edited by: pietja on Dec 9, 2009 11:28 AM

Hi Ben!
Is this what you need?
Column Heading Template       <th class="t5ReportHeader"  id="#COLUMN_HEADER_NAME#" #ALIGNMENT#>#COLUMN_HEADER#</th> Column Template 1 <td class="t5data" headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# style="background-color:#f00;"> #COLUMN_VALUE# </td> Column Template 1 Condition Use Based on PL/SQL ExpressionColumn Template 1 Expression '#CHARGE#'='-'Column Template 2 <td class="t5data" headers="#COLUMN_HEADER_NAME#" #ALIGNMENT#>  #COLUMN_VALUE#</td>Column Template 2 Condition Use for Odd Numbered RowsColumn Template 2 Expression
Column Template 3 <td class="t5dataalt headers="#COLUMN_HEADER_NAME#" #ALIGNMENT#>  #COLUMN_VALUE# </td>{code}
Column Template 3 Condition{code} -Select Condition-{code}
Column Template 3 Expression  {code}{code}
Regards
Petra                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Problems with template condition

    Hi,
    I would like to set a condition for a report template by the column header content.
    I have tried the following statement:
    instr(#COLUMN_HEADER#, 'TITLE')>0
    and I have got the error message:
    "ORA-06550: PLS-00103: Encountered the symbol "#" when expecting one of the following: ( ) - + ..."
    Do you have any idea why it doesn't work?
    Thx!

    In plain english :-) :
    I want to create a report with news on the start page of a htmldb application. So I have created a table with 3 columns: DATE, HEADLINE, CONTENT. Now I want to create a template for the layout. Every record in the news table should be showed in the following way:
    HEADLINE DATE
    CONTENT
    My idea was to create 3 conditional templates for every column of a record depending on the column's name. For example a new table row (<tr>) for the content column etc.
    The column template conditions based on PL/SQL expression (e.g. instr(#COLUMN_HEADER#, 'CONTENT')>0) don't work... :-(

  • Report Template -  NULL in Row Template Condition

    I just found a workaround, but,
    in a report template, in a Row Template # Condition, based on a PL/SQL expression, the condition always fails if/when #COLUMN_VALUE# was NULL.
    I worked around this with a NVL in the query - but, is there a better way?
    I want the column highlighted when the value is null - to point out where values need to be entered - i.e. when the record needs to be updated.
    THanks - Karen

    Ok, I have since found out that the setting to make a report template
    available in the Based on > Visualization templates is in the
    'package.xml' file for each report. The value that needs to be changed
    is <IsQueryParameterized>0</IsQueryParameterized> and change the 0 to 1.
    kmcooke1
    kmcooke1's Profile: https://forums.netiq.com/member.php?userid=5806
    View this thread: https://forums.netiq.com/showthread.php?t=49091

  • Row Template Condition doesnt working

    Hi all,
    i have a self made "row template" for my report:
    "Before Rows":
    <table cellpadding="5" cellspacing="0" border="0" summary="">
    <tr>
    <th>ID</th>
    <th>ID_SHOW</th>
    <th>TITEL</th>
    <th>DOCUMENT</th>
    <th>status_external</th>
    <th>status_internal</th>
    <th>action</th>
    <th>tage_action</th>
    <th>crreated_on</th>
    <th>tage_anlage</th>
    <th>creator_name</th>
    <th>editor_hotline_display</th>
    <th>prio</th>
    <th>color</th>
    <th>erledigung_bis</th>
    <th>histo</th>
    <th>arbeitskorb</th>
    </tr>
    "Row Template 1"
    <tr class="#1#">
    <td >#2#</td>
    <td>#3#</td>
    <td style="background-color: yellow;">#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    </tr>
    "Row Template 2"
    <tr class="#1#">
    <td>#2#</td>
    <td>#3#</td>
    <td>#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    <td>#15#</td>
    <td>#16#</td>
    <td>#17#</td>
    <td>#18#</td>
    </tr>
    "Row Template 2 Condition" - use based on PL/SQL Expression
    '#DOCUMENT#' is null
    The "Row Template 1" is to be show only if Column "DOCUMENT" is not null, otherwise "Row Template 2" is to be show if Column "Document" is null. I have test various examples:
    '#4' is null, '#4#' is null and '#DOCUMENT#' is null. Without effect. Only "Row Template 1" is showing.
    Can anybody help me?

    Hi,
    null in conditions would return no value rather than 'null' - you can catch this by using an empty string - so:
    '#4#' = ''Andy

  • Generic Column Template - Column Template Conditions

    Hi,
    I have the following sql report snippet (as an example):
    select a,b,c,apex_item.checkbox(1,active_flag,DECODE (active_flag, 'Y', 'CHECKED','')) as "Active"
    from tableA
    Attached to this report, is a report template which I am trying to attach Column Template Conditions as I basically want to display all rows that have an active flag of 'N' as red or leave as default colour but unfortunately I can't seem to get this to work.
    I believe my Column Template Expressions are not correct as I have also tried "ACTIVE" = 'N' and still no luck.
    I have the following setup within the Generic Column Template, i,e:
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT# style="background:red">#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#1' = 'N'
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT#>#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#1' <> 'N'
    Any ideas what I could be missing?
    Thanks,
    Tony.

    Hi Tony,
    I think the issue here might be because the field you are trying to evaluate in the column template is a Check box. I tried this and it worked :-
    select a,b,c,apex_item.checkbox(1,active_flag,DECODE (active_flag, 'Y', 'CHECKED','')) as "Active",active_flag
    from tableA
    In the report attributes set the second active_flag column to not show (i.e. the one that is not the check box).
    In the Column Template
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT# style="background:red">#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#ACTIVE_FLAG#'='N'
    Column Template 1 = <td class="t12datavalue"#ALIGNMENT#>#COLUMN_VALUE#</td>
    Column Template 1 Condition = Use based on PL/SQL Expression
    Column Template 1 Expression = '#ACTIVE_FLAG#'='Y'
    Regards
    Paul

  • How to reference template substitution string in PL/SQL condition

    hi -- I need to conditionally display an item based on the value of #TITLE#. I'm currently trying a pl/sql expression function body returning boolean
    DECLARE
    page_type VARCHAR2(1000);
    BEGIN
    page_type := lower(substr(:TITLE,instr(:TITLE,'Query')));
    if (page_type = 'query') then
    return TRUE;
    else
    return FALSE;
    end if;
    END;
    There are no errors, but the condition is not being met when it should be.
    I tried setting some app items to the value of #TITLE# and I'm obviously not referencing it correctly; they're all null:
    :TEST_VALUE := &TITLE.;
    :TEST_VALUE2 := :TITLE;
    :TEST_VALUE3 := V('TITLE');
    Help?
    Thanks,
    Carol

    Hi,
    You can use javascript on page HTML header
    <script>
    function getDocTitle(pItem){
      $x_Value(pItem, document.title);
    </script>And page body
    onload=" getDocTitle('Px_YOUR_ITEM');"Br, Jari

  • Conditions: SQL Expression vs. PL/SQL expression

    In a Condition, what is the difference between a SQL Expression and a PL/SQL expression? The examples shown when creating, say a validation show similar things
    example of pl/sql expression: to_char(sysdate,'d')=1
    example of sql expression: instr(...) > 0
    Arent the 2 expressions above similar? What makes one a sql expression and other a plsql expression?
    Thanks

    Thanks, but I think its more than a matter of documentation.
    I had a SQL expression like
    :REQUEST IN ('button1','button2') AND NOT pkg.fn
    where pkg.fn is, of course, a packaged function returning BOOLEAN.
    The process that this condition was attached to was just not firing. No errors, nothing. I was ready to tear my hair out! I changed the expression type from SQL to PL/SQL and everything was fine.
    I think there should be a check in the App Builder for this kind of thing so that such invalid conditions are not allowed to be created.
    Thanks

  • Conditional Display of Interactive Report Based On Different SQL Query

    Hello,
    I have two drop down list on top of my page and below that I have a interactive report.
    Based on user selection of values from drop down, interactive report should change based on different SQL queries.
    Is it possible to have different SQL queries based on values from drop down and generate interactive report based on that?
    Thanks

    I am passing my drop down value to apex_collection like the following:
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY( p_collection_name => 'IR_LIST',
    p_query => REQUEST_VIEW(:P12_VIEW));However when I change the values from the drop down, :P12_VIEW is not getting the value from drop down even though I could see value being changed in URL. I have created page process for apex_collection
    Process Point - OnLoad - Before Header
    Run Process - Once Per Session or When ResetCould someone suggest as why I cannot get the values in function when drop down is changed?
    Regards

  • Report Template, Column Template, Column Template Condition

    I have a template, Standard Revenue from Standard, I have cloned for a Classic report.
    Application ###>Shared Componets>Templates>Edit Report Template
    Column Template 1 looks like:
    <td#ALIGNMENT# headers="#COLUMN_HEADER_NAME#" class="t1data_revenue">#COLUMN_VALUE#</td>
    I have set Column Template 1 Condition to:
    "Use based on PL/SQL expresiion"
    I have tried several expression in "Column Template 1 Expression" - last one is:
    case
    when #COLNUM# <= 2 then false
    when #COLUMN_VALUE# < 0 then true
    else false
    end case;
    I am trying to use the value in "Column Template 2" when to value of the #COLUMN_VALUE# < 0
    where "Column Template 2" is :
    <td#ALIGNMENT# headers="#COLUMN_HEADER_NAME#" class="t1data_revenue_negative">#COLUMN_VALUE#</td>
    I get the following error when I run the page:
    ORA-01403: no data found
    and
    ERR-1025 Error processing PLSQL expression. case when #COLNUM# <= 2 then false when #COLUMN_VALUE# < 0 then true else false end case;
    Any help will be appreciated.
    thank you,
    jwm

    Hi,
    That's actually easier. See: [http://apex.oracle.com/pls/otn/f?p=267:60]
    The SQL for both reports is:
    SELECT EMPNO, ENAME, NVL(SAL,0) SAL, NVL(COMM,0) COMM
    FROM EMP
    ORDER BY EMPNOThe SAL and COMM columns have been formatted using:
    999G999G999G999G990D00For the Row Template, the Row Template 1 setting contains an empty space (you have to have something in there otherwise Apex adds back in a default row containing five cells!). The condition for this is:
    TO_NUMBER('#COMM#','999G999G999G999G990D00') < 100The template will see the data as a string, so we use the same number format to convert that string back into a number and compare this to 100. If we didn't use formatting on the numbers and we are sure that every row contained a number (hence the use of NVL()), then you could use:
    #COMM# < 100Row Template 2 contains the format for the rows that need displaying:
    &lt;tr&gt;
    &lt;td class="t18Data"&gt;#1#&lt;/td&gt;
    &lt;td class="t18Data"&gt;#2#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#3#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#4#&lt;/td&gt;
    &lt;/tr&gt;and is unconditional.
    The only other settings on the Row Template are the Before Rows:
    &lt;table class="t18Standard" style="border-collapse:collapse; border:1px solid black;"&gt;
    &lt;tr&gt;
      &lt;th class="t18ReportHeader"&gt;Empno&lt;/th&gt;
      &lt;th class="t18ReportHeader"&gt;Ename&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Sal&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Comm&lt;/th&gt;
    &lt;/tr&gt;and After Rows:
    &lt;/table&gt;Of course, you will note that the record counters at the bottom still show the number of records in both reports - as the SQL still outputs the same data, this doesn't change.
    Andy

  • #COLNUM# #COLUMN_VALUE# in column Template Condition

    Hi,
    Is it a limitation to use #COLNUM# #COLUMN_VALUE# in column Template Condition?
    I specify a column template condition #COLNUM#=3 in the column template condition, but the error
    "ERR-1025 Error Processing PLSQL expression #COLNUM#=3" prompt.
    Is that a limitation?
    Thanks

    Hi,
    I can use column name in template column condition with no problem, but I want to apply the condition to few fixed columns(more than 10 columns),
    I know I can do something in the SQL query of the report, but it will be too tedious.
    If only the #COLNUM# etc is usable in template column condition, it will save a lot of job.
    Anyone know the reason #COLNUM# not usable in template column condition?
    Thanks

  • Report template - How to reference COLNUM in the col template condition?

    Hi,
    I have a query with 4 columns. based on this query I would like to make a report with a row layout that looks something like this:
    | column1 value |
    | column2 value | column3 value | column4 value |
    I created a report template, four column templates: one for column 1, one for the following columns and one for the las column of the report.
    My problem is that when I reference *#COLNUM#* like mod(#COLNUM#,4) = 1 in the Column Template condition fields, then I get *'ORA-06550: line 1, column 34: PLS-00103: Encountered the symbol "#" when expecting one of the following: ( ) - +....'*
    Is referencing COLNUM not allowed in the Column Template Condition field?
    Tamas
    Edited by: Tamas Szecsy on Jul 16, 2011 11:33 PM

    Tamas Szecsy wrote:
    I have a query with 4 columns. based on this query I would like to make a report with a row layout that looks something like this:
    {noformat}| column1 value |{noformat}
    {noformat}----------------------------------------------------------------{noformat}
    {noformat}| column2 value | column3 value | column4 value |{noformat}
    I created a report template, four column templates: one for column 1, one for the following columns and one for the las column of the report.For this you need to create a Named Column (row template), not Generic Columns (column template).
    Before Rows
    <table class="foo">
    Row Template 1
    <tr>
      <td colspan="3">#1#</td>
    </tr>
    <tr>
      <td>#2#</td>
      <td>#3#</td>
      <td>#4#</td>
    </tr>
    After Rows
    </table>No conditions.
    What about table headers?
    My problem is that when I reference *#COLNUM#* like mod(#COLNUM#,4) = 1 in the Column Template condition fields, then I get *'ORA-06550: line 1, column 34: PLS-00103: Encountered the symbol "#" when expecting one of the following: ( ) - +....'*
    Is referencing COLNUM not allowed in the Column Template Condition field?I suspect not. Only <tt>#ROWNUM#</tt> is mentioned in the online help for Column/Row Template Expressions. <tt>#COLNUM#</tt> is only indicated in the Column/Row Templates themselves.
    (Always post sample layouts using \...\ and/or {noformat }...{noformat } tags to preserve formatting/stop Jive from turning it into something else.)

  • Accessing auth. scheme in PL/SQL expression

    I have an Authorization scheme (AS1) that returns true for a certain set of users.
    I have some form items on a page that have their Read Only condition set to a PL/SQL expression based on values of other form items.
    But for the set of users for whom AS1 returns true, I would like to disable the readonly condition i.e. display the page item normally. This would be equivalent to adding a AND NOT AS1 to the PL/SQL expression.
    Is there a way to access the authorization scheme in an PL/SQL expression in this fashion?
    Thanks

    Thanks Scott
    Does the implementation of that API respect the "cached per page view or per session" attribute of the authorization scheme? In other words, does using that API in a PL/SQL condition result in identical behaviour as declaratively attaching the authorization scheme to a component?
    Thanks

  • Schedule Batch in sql Express Edition

    Hello
    I have created one batch which will run after every 5 minute & Delete Some Data from table based on some condition.
    Code is 
    DELETE FROM MyLoginUser
    WHERE DATEDIFF(MINUTE,LastUpdateTime,(select CURRENT_TIMESTAMP)) > 5
    That is working Fine No issue.
    But One of our client uses SqlExpress Edition. In that I found that There is no Sql Agent Functionality. SO I think Batch is not DIrectly suported.
    So Can anyBody Guide me how to achieve this kind of Batch Schedule in sql Express?
    Thanking you in advance.
    Regards
    Vipul Langalia

    Hello
    Thanx for the help I have seen that one row get deleted.
    One last thing I want to ask is that In batch I also write exit at end like  
    d:
    cd "Task Scheduler"
    cmd /k sqlcmd -i backup.sql
    exit
    But still Command Prompt did not close after Process is done.
    One more thing I want to ask is that If I dont write cmd /k then It will not work any functionality? So is it necessary that we must write cmd /k to execute script?
    Other thing is command Prompt is not getting close after process is done.. 
    Can you please do the last help to me ?
    Other things are fine.
    Thanking you in advance..
    Regards
    Vipul

  • Javascript based on PL/SQL function.

    Hey all,
    I'm developing an application with Apex and have run into a problem.
    I have a form page with the standard create, delete and cancel buttons. I need to be able to click the Create button, which will run a PL/SQL query, and based on the return of the function, either just continue the Insert to the table, or generate a popup warning, and then complete the table insert.
    I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
    Any help appreciated.
    Thanks,
    Brett Crowley.

    Hello Brett,
    >> I was thinking of having a Process that ran the javascript, and was conditional on the PL/SQL query, however i haven't had much luck.
    APEX Processes are server-side resources, while JavaScript is a client-side resource. As such, you can’t invoke JavaScript code from within a PL/SQL code. However, the reverse direction – invoking PL/SQL code from a JavaScript code – is possible by using AJAX. In general, using AJAX allows you to call to an APEX on-demand PL/SQL (application) process, which in turn can return a result to the calling JavaScript code. In this point, based on the returned result, you can decide whether to issue an alert box or (programmatically) submit the page for further processing.
    This forum includes many example of using AJAX, and I believe that the following article can also be a helpful starting point.
    http://www.packtpub.com/article/ajax-implementation-apex
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • 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...

Maybe you are looking for