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

Similar Messages

  • 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

  • How to edit the "Oracle Three Column Layout" page template?

    Hello all,
    My question is very simple: how can one edit the Oracle Three Column Layout page template? I tried searching the file system for a file called "threeColumnTemplate.jspx" but I cannot seem to find it. Is it hidden into a jar file of some kind? Or at least can anyone tell me the name of the nice component located in the upper right corner that displays the loading activity?
    Thanks.

    Extract oracle-page-templates.jar with winzip & browse to location oracle/templates
    open the file threeColumnTemplate.jspx using jdeveloper.
    after you open it , you can edit the logo , save the changes & create this jar again or save it to the zip which will automatically update the jar.

  • Formula Columns in Data Template

    Hi,
    Is it posiible to have formula columns in data template apart from summary columns.please suggest.
    Regards

    You can put those formula-logic in sql query.
    summation/avg functions can be used directly in element.

  • Additional Columns in Appraisal Template

    Hi,
    I am currently creating a template similar to MBO in PHAP_CATALOG_PA.
    Can i add additional columns in the template. Is there any configuration step to add additional column and give a column header name. For example: See Below, I require first column to be the list of objevtives, second column appraisee set his goals at the start of the year after having a mutual discussion with his manager. 3rd and 4th cloumns are for Mid year review one for self and other for manager. 5th and 6th columns are for the end of financial year to give the final scores.
    Please note we are on ECC 6 with Latest support pack 61 (But not EHP4)
    Objectives                                 | Goal Setting by | Mid Year Review | Mid Year review | Final Review |Final Review
                                                        Self & Manager   Self                       By Manager         By Self           By Manager
    1. Primary Objectives
    2. Department Objectives
    3. Individual Objectives
    4. Others.
    Regards
    Srinivasa Naidu

    Hi,
    Yes, you can create custom columns through transaction code OOHAP_BASIC.
    Hope this helps.
    Donnie

  • How to use formula column,placeholder column in data template option

    Hi All,
    Can you some idea on these concept with example.
    Thanks in adv

    >
    formula column,placeholder column
    >
    it's oracle reports terms?
    http://oraclebizint.wordpress.com/2007/08/22/oracle-reports-to-bi-publisher-conversion-utility/
    http://eoracleapps.blogspot.ru/2009/04/how-to-convert-oracle-reports-in-bi.html
    so convert your oracle reports to bi publisher and you'll see mapping for your case

  • Need to show the images in calculated column based on the condition in sharepoint 2013.

    Hi ,
    I'm working in sharepoint 2013, In this i want to show an image in calculated column based on the condition, but image is not showing .
    In sharepoint 2010 its working with help of javascript in content editor on the same page. Same thing i tried in SP 2013. but doesn't work.
    Could any one please give proper solution for this?
    Thanks in advance.
    by,
    Siva.

    Hi please provide the JS you have used in the content editor as well as the calculation for the column so we can better understand what's maybe differs?
    Blog: chrisstahl.wordpress.com Twitter:
    @Cstahl

  • Link to PL/SQL procedure using a Template Manager template.

    Hi,
    I need to link a portal application report (report from SQL query) to a SQL procedure that uses a template manager template. The PL/SQL procedure requires parameters. I'm not be able to create a link based on a PL/SQL procedure. The only solution I found is to setup a link to a Form based on that procedure. But the form is only used to call the PL/SQL procedure by clicking the submit button and redirect to the template.
    Another question:
    Is it planed to support dynamic links based on column conditions?
    I'm using Portal release 3.0.7.6.2.
    thanks in advance
    Jens

    Jens,
    You may want to search the Oracle9iAS Portal Applications forum. It may have the answer you are looking for. This forum is for questions related to the Portal Development Kit.
    Thanks,
    Sue
    Sue

  • I entered new fields in a form that was created last year to update it.  However, now when I view the responses, they are listed as Column 1, Column 5, etc.  It doesn't show a label for the actual field when I view the responses.  Can you please help?

    I entered new fields in a form that was created last year to update it.  However, now when I view the responses, the headings are listed as Column 1, Column 5, etc. rather than the name of the heading.  Can you please help?

    Hi Mike,
    CRSE is an OEM Product and for use with a custom application they have written. Unfortunately we don't their reports or how they are connecting, it would appear they were originally built off a SQL and then set to a Dataset in the app or they could be adding the data source at runtime. Lots of variations and without access to the source code to see what they are doing not much we can help you with.
    You need to contact the OEM Partner for help in resolving this and find out what you can and need to do to update your SP and work with their canned reports,
    Thank you
    Don

  • Having trouble connecting column to column using niSwitch on a PXI 2530

    Having trouble connecting column to column using niSwitch vi on a PXI 2530 matrix module.  I have configured my switch using Switch Executive, have identified aliases, and verified routes and route groups.  When I use LabVIEW to connect column to column I get an error reading "cannot find connection between c0 and c1".  c0 and c1 are example columns I want to connect.  Any help is appreciated.

    You can find NISE VIs in the function pallete in LV if you have installed LabVIEW support when you installed NISE (this is selected by default in the installer if you had LV installed before installing NISE).
    Also, choose between niSwitch and NISE based on your need - if all you ever do is connect two channels in your application, then configuring a NISE virtual device is probably an overkill (and so is using a switch in this case:-) . However, if you are going to manage multiple routes, then using NISE configuration will let you create named routes and route groups, which you can then invoke (connect/disconnect) in your application and have the configuration part managed outside your application. The code would then concentrate solely on establishing a necessary connection(s) via connecting a route or a route group, while if you were to use niSwitch for this purpose, you would have to keep the logic of connecting inside your application, together with the list of channels that need to be connected.
    Start with using NISE, and see if you like it.
    http://www.ni.com/pdf/products/us/3msw112-113.pdf
    Srdan Zirojevic

  • Write data to Text file - Column by Column

    Hi,
    I want to write a table of data(2D) to a text file. I acquire 1D array(6 lakh rows) of data & want to write that in text file as column 0. And next 1D array to the same text file as column 2. Is it possible todo that?
    I don't want to accumulate 2D array and write at last since it consumes more memory & Labview Hangs.
    Kindly share your ideas.....
    Labview 8.2 
    Regards,
    Raja 

    HI,
               I hope this works for you but this vi doesnt hanged my PC or Labview. Please check with it and let me know.
    Regards,
    Gita
    Message Edited by AutoTEC on 10-17-2008 04:15 AM
    Attachments:
    Write column by column.vi ‏1398 KB

  • How to display the rows in to columns and columns into rows?

    DES:- I know by using pivot and unpivot you can convert rows into columns and columns into rows but i don't know how to write the syntax?

    Hi,
    Besides the places Martin mentioned above, there are many examples in the forum FAQ:
    https://community.oracle.com/message/9362005#9362005
    For an example of both PIVOT and UNPIVOT in the same query, see
    http://forums.oracle.com/forums/thread.jspa?threadID=920854&tstart=0

  • SMARTFORMS: 2 columns (each column consist 1 table) in 1 page

    Hi...,
    I've got problem that there is requirement to development smartforms as below format:
    Page 1
    column "A"                column "B"
    No. Description     Qty Amt     | No. Description     Qty Amt
    1. Desc1         1 100 |  5. Desc5               5 500
    2. Desc2         2 200 |  6. Desc6               6 600
    3. Desc3         3 300 |  7. Desc7               7 700
    4. Desc4         4 400 |  8. Desc8               8 800
    Page 2
    column "A"                column "B"
    No. Description     Qty Amt     | No. Description     Qty Amt
    9. Desc11       11 110 | 13. Desc15             15 510
    10. Desc12       12 210 | 14. Desc16             16 610
    11. Desc13       13 310 |
    12. Desc14       14 410 |
    It means that in one page consist of 2 column, A and B. Each column has each own table which is identically each other. After writing line item in column "A", then automatically  go to column "B" until finished.
    My question is how to solve it in smartforms?
    What I did before, I created internal table which is already containing the data like above then just pass through table in smartforms like usual.
    Is there any solution?
    Thanks a lot in advance.

    Hi Herlina,
    maybe you have to solve this problem like in Abap code. You know the number of column that you could set on your page, for example 4.
    So create a table with col_A and col_B, use the number 4 to set data into this table.
    Like that.
    loop at it_x.
      w_num = sy-tabix / 4.
      perform p_test_odd using w_num changing w_odd.
      if w_odd eq 'X'.
    *   move in col_b   
      else.
    *   move in col_a
      endif.
    endloop.
    (w_num is a type n)
    I didn't test the code, but I hope that will help you.
    Regards
    Frédéric

  • Can anybody help....SQL to display row as column and column as rows

    Can anybody help in writing a SQL to display row as column and column as rows?
    Thanks

    check this link:
    Re: Creating Views - from rows to a new column?

  • Enable column some column in a JTable

    Hi guys i have to enable just one column named QUANTITE in my JTable...i read that i must overwrite the isCellIditable() method to do so..
    here my code:
    final int QUANTITE = 2;
    public boolean isCellEditable(int row, int column){
    if(column == QUANTITE){
    return true;
    else{
    return false;
    help me please :P

    ok...but hehe the problem is that anyway all columns
    are editable...Make sure that your JTable does really use your TableModel but not something else

Maybe you are looking for

  • Error reading project file : no protocol

    I have followed the instructions exactly as in the j2ee tutiorial ,but, when I run asant , an error occurs: : Error reading project file : no protocol: ../../common/targets.xml Urgent!

  • How can I exit my UNIX script when my PLSQL script in it calls an error?

    hello. I hope someone can help with my error handling and exiting-in-the-right-place problem. I have several PLSQL scripts that are called from a UNIX script to insert/update employee records in ORACLE Financials. At the end of the UNIX script, depen

  • Windows trying to install drivers for iPod...

    So here's my problem. Whenever I try to connect my girlfriend's iPod, Windows XP trys to recognize a new device and the driver installation wizard pops up. I get a popup on the taskbar and Windows tries to install a driver for the iPod. If I cancel t

  • Streaming from a specific location within a file

    Hi everybody, I'm a newbie here so please be patient if this is a trivial question. What I need to know is the following: can I start streaming a video/audio file from a specific location (like a timestamp) with Flash Media Server? More precisely, th

  • Printing is out of order

    I have a new 15 in. Macbook Pro. and an ancient hp deskjet 845c printer. On my windows computer I had no problems and on the new mac my printing is a little screwy. For example I just printed off about 5 different documents in .pdf form through previ