Dispaly condition in report column

Hi
I want to ask if there is way to control the display of report column depending on the value of cloumn itself, for example if the value of the coulmn is null, the column will not appear
note: the report return one row
Thanks in advance

Thanks for reply, i don't want to use sql query for performance isuues
is there any other solution, like to referecne the column it self inside the condition

Similar Messages

  • Conditionally Display Report Column

    hi,
    i want to display report column Conditionally .
    i have created a report . there are multiple column Like. BILL NO,BILL DATE, PAYMENT MODE, CHEQUE NO, CHECQUE DATE, TOTAL AMOUNT
    Now i want to display only BILL NO,BILL DATE, PAYMENT MODE, TOTAL AMOUNT when i select PAYMENT MODE Cash in Select List ITEM
    And
    i want to display only BILL NO,BILL DATE, PAYMENT MODE, CHEQUE NO, CHEQUE DATE,TOTAL AMOUNT when i select PAYMENT MODE Cheque in Select List ITEM
    How Can i Conditionally Display Report Column.
    Thanks
    Manoj KAushik

    Hi,
    try this as report query - pl/sql function returning select statement.
    declare
         qry_str varchar2(1000);
    begin
       if :p1_select_list = 'PAYMENT MODE' then
            qry_str := 'select BILL NO,BILL DATE, PAYMENT MODE, TOTAL AMOUNT from yourTable';
       else
           qry_str := 'BILL NO,BILL DATE, PAYMENT MODE, CHEQUE NO, CHEQUE DATE,TOTAL AMOUNT';
        end if;
         return qry_str;
    end; Regards,
    Shijesh

  • Interactive report, conditional display of column link

    Hello,
    We have requirement to disable editing in case that status of field is 1 (1=Closed).
    Is there any way to disable it on interactive report.
    case when status=1 column link should be disabled (not visible) in order to prevent future edits on payroll.
    SELECT payroll_no, status
    FROM hr_payroll
    ORDER BY payroll_no DESC;
    I tried link below, but it's not working in my case.
    http://nerd.net.au/24-apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-…
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    Application Express 4.2.2.00.11
    Thank you in advance,
    Regards, FM

    CASE WHEN status = 'ACTIVE' then
    <a href="f?p=&APP_ID.:60:&SESSION.::&DEBUG.::P60_EMPLOYEE_ID:'||employee_id||'"> </span><br /><span class="Moobi_Code"><img src="#WORKSPACE_IMAGES#deactivate_button.png"></a>'</span><br /><span class="Moobi_Code">ELSE NULL END deactivate_employee,
    from
    EMPLOYEES
    What exactly is the error you get? What HTML is showing in the HTML source?
    Just by looking at this I would say you need to remove the "/" in front of the f?p
    Keep in mind this way could cause problems if you start to use checksum, then you might want to look into using APEX_UTIL.PREPARE_URL to create your URL.

  • Conditional display of list box in form (depends on other report column)

    Hello,
    i have one question regarding conditional display in forms.
    I have a tabular form where only one column ("flag") is updateable, all other columns are visible only.
    I changed the column "flag" from "standard report column" to "Select list (static lov)", which has the values "yes" and "no".
    This works fine. But in the running form i want to display the list box only if the column "status" = 'ERROR'.
    The column "status" can have the values 'ERROR' and 'OK'.
    When one record has "status" = 'OK', the column "flag" should not display the list box (only empty column row),
    when one record has "status" = 'ERROR" the column "flag" should display the list box.
    The idea behind is that if a record has "status" = 'ERROR' i have the possibility to confirm that "error" and update the column "flag" with "YES". This should only be possible for errors.
    This is my main problem.
    I tried with conditional display, but this hides or shows the column for the whole report/form, not on record level...
    The second problem then is, that if the column "flag" is changed to "YES" in case of column "status" = 'ERROR', then it should not be possible to change it again to 'NO". At the beginning it is 'NO', but once changed to 'YES' it should not be changeable any more.
    Is this possible?
    Thank you in advance,
    Matthias

    Hello Mike
    your solution sounds good, but unfortunately it is not working.
    None of my 2 columns are displayed, although i tried it as you wrote and the conditions should match...
    But i am no sure if this can work. If so, the 2 columns must fuse to 1 column:
    ID STATUS FLAG
    1 ERROR yes/no => comes from column1
    2 OK (null => comes from column2
    so "FLAG" must display column1 and column2 in one column. is that possible?
    regards,
    Matthias

  • XML Report - Conditionally showing a column in between other columns

    I have a XML Report, with columns
    A, B, C, D
    Now I need to add a new column E in between B and C when certain condition is satisfied.
    A, B, E, C, D
    for column E, I kept <?if:column='X'?> columnname <?endif?>.
    When condition is satisfied it is displaying column and also values, but when not an empty column is displayed with no values, I dont want this empty column when condition is not satisfied.
    It should just show A, B, C, D instead of A, B,  , C, D
    Request you to help me with my requirement.

    Hi Kavipriya, thanks for response.
    I tried below condition for that column:
    <?if@column:OM_Due_Date_X='Y'?>  <?OM_Due_Date_L?>  <?end if?> 
    I am setting OM_Due_Date_X in sql package to 'Y' if customer is 'Rob' else it will be 'N'.
    If 'Y', then I am displaying a column name OM Due Date which is <"OM_Due_Date_L?>
    Now for Column values it is just <?OM_Due_Date?>
    Do I need to change anything here ?

  • Hide Report Column Conditionally

    Hi All,
    I have a report with 12 columns. I want to hide the particular report column if all
    the values in that particular column is 0 (Zero).
    Can you please help me in achieving the same?
    Thanks in advance.
    Thanks,
    SKJ

    Report Attributes > Column Attributes : CBB
    For the display condition, you can't refer to the values store in the column. It wouldn't make any sens to know all the values contain in a column at this point. You can use the #CBB# variable for "Column Formatting" and "Column Link" but you can't use it for "Conditional Display".
    WRONG :
    Value of expression 1 <> Expression 2
    and in Expression 1 i put column name i.e. CBB
    and Expression2 I put 0.
    GOOD :
    You have to use a query or a function to determine if the column should be displayed.
    Condition Type : PL/SQL FunctionBody Returning a Boolean
    Expression 1:
    DECLARE
    l_retval BOOLEAN := TRUE;
    l_sum NUMBER;
    BEGIN
    SELECT sum(your_column) AS sum_of_CBB
    INTO l_sum
    [FROM and WHERE of your initial QUERY goes here];
    IF l_sum = 0 THEN
    l_retval := FALSE;
    END IF;
    return l_retval;
    EXCEPTION
    WHEN no_data_found THEN
    --should never go here since your report would be empty
    null;
    END;

  • Conditional Display of Report Columns

    I'm trying to hide a vertical list column, but it is either permanently off or permanently on. Any ideas!
    For example:-
    Display Department name if not null

    now i get why you're not liking the report templates approach to this issue. to be honest, my other suggestion on that "Referencing Report Columns" thread might probably be okay here. assuming you're looking up your one detail row with a primary key value, doing the extra query can't be too expensive. if you don't want to go that route (though i'm likin' it, the more i think about it) or the templates one, you might consider either of these two angles:
    1) code the detail page's region as a plsql anonymous block that selectively shows what it needs to show.
    2) code the appropriate nvl's or case statements into your detail page's report region and have that select statement select out most of your html formatting for you.
    i don't particularly like either of the two above suggestions, but now you at least have them. i think i'd run with the solution where you select the detail row twice, but please don't quote me on that.
    regards,
    raj

  • Interactive report column filters to display differently than column values

    Greetings...
    We use images a lot in our interactive reports to provide a visual representation to a status, or something locked for update, or what-have-you. By default, when a user clicks the column heading of a column which contains images, the drop-down list that shows up displays the actual images, which is nice for the user to identify exactly which thing they want to filter on. The problem is when the user selects on of the options in the filtering drop-down, the resulting condition that is displayed under the interactive report search bar is the HTML code of the image. I'd like something else to display there because showing the user the HTML code is atrocious.
    I didn't think what I want is possible, but then I came across the Page Locks page within ApEx (page 4000:291 in ApEx 4.0.1) which displays a list of all the pages of an application and whether they are locked or not. It also allows you to bulk lock or bulk unlock a bunch of pages. That page uses an interactive report with a column called "Status" which contains images that represent whether the page is locked or not. When you click the "Status" column heading to filter, instead of seeing the images of an open and closed lock, you see the words "Page Locked" and "Page Unlocked." And even better... when you select on of them, the condition that is displayed to the user is very user-friendly.
    Can someone tell me how this is done so I can replicate it in my own apps?
    Shane.

    Why not create the IR using the text you require e.g. 'Lock', 'Unlock' and then use JQuery to replace the text in the report with the image you want. All the filters should then show the plain text and the report will display the image. e.g.
    http://apex.oracle.com/pls/apex/f?p=46801:1
    Here's what I did:
    Firstly make sure the IR has a region template.
    Then create a Dynamic Action with the following attributes:
    1. Advanced
    2. Event: After Refresh
    3. Selection Type: Region
    4. Region: [select the IR Region]
    5. Action: Execute JS Code
    6. Fire on page load: [checked]
    7. Code:
    $('td [headers="TEST"]').each(function(index) {
      if ($(this).text() == 'Lock') {
        $(this).empty().html('<img src="/i/htmldb/icons/locked_small.gif" alt="Lock" />');
      else {
        $(this).empty().html('<img src="/i/htmldb/icons/unlocked_small.gif" alt="Unlock" />');
    });Where TEST is the column name.
    That's it, this may also be of interest:
    http://simonhunt.blogspot.com/2011/10/adjusting-interactive-report-column.html
    I hope it helps
    Shunt

  • Cannot edit a field that is "Standard Report Column" when new row added

    Hi everyone,
    I have created a master-detail form from the wizard and within the detail report region source I have used apex_item.xxx API
    example;
    select C1, C2,
    CASE when C2 ='N' then
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'ENABLED', 'NO',null,null, 'f03_#ROWNUM#')
    else
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'DISABLED', 'NO',null,null, 'f03_#ROWNUM#')
    END C3
    from table;
    All columns C1,C2,C3 are defined as "Standard Report Columns".
    The results allows the column C3 field to be enabled or disabled for input depending on a condition.
    The problem is when you hit the default button "Add Row" to add a new row. The row is non-editable and is populated with null values.
    What I want is to allow input when a new row is inserted into the multi-row detail form.
    Can any one help?
    Is there a way to change the Display As field for the new row columns to "text field" from "standard report column" dynamically?

    I think you will need to use the old way of adding rows instead of the new one. I remember having headaches trying to get it working.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to display special characters in APEX Classic Report column

    Ref: Thread: How to display newline characters as new lines
    Version: APEX 3.2
    Hi,
    I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
    Thanks very much.
    Rohi
    Edited by: Rohi on 18-Jul-2012 04:21

    876651 wrote:
    Hi,
    Thanks for your response.
    I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
    This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
    But it is not displayed like it should be.
    I do not want the value to be displayed along with the html tags as a string.
    I want the html tags to take effect and highlight the value within it.
    Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
    So I changed it to 'No' and and it contained the html tags.
    I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
    You can't pass HTML and CSS around in URL parameters.
    I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
    decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
    I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
    <span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach...

  • Can we change the background color of a Standard report "column"?

    4.2.1
    Theme 24 - Cloudy
    Hi There,
    I searched this forum and online but did not get a straight forward way to change the color of a standard classic Apex report column. I want the whole columns background color to be blue. I tried some of the suggestions for using span etc, but they did not work.
    Was wondering if anyone has a solution for this? would be very helpful!
    Thanks,
    Ryan

    Use a custom named column report template with <tt>&lt;colgroup&gt;/&lt;col&gt;</tt> and CSS as in these threads.
    Could also be done with JavaScript, but if the entire column is to be coloured (rather than individual cells based on some condition), the template approach will be simpler and have better performance

  • Enhance GRC issue status report columns

    Hello GRC Gurus
    I am new to GRC application and I have a requirement to enhance u201CIssue Statusu201D report  fields.
    Process:
    Goto -> Report Center - > "Issue status" Report -> run based on the condition. It will display ll the issue report in a ALV table formate with the columns
    Organization     Subprocess      Control       Issue     Ectu2026(As configured in SPRO)
    But my requirement is to add a Custom additional Field to the ALV table report:
    Is there any enhancement to add the custom field in to the report  and implement  logic to populate data to the same?
    Kindly let me know your comments.
    Thanks you ,
    Regards,
    Magesh
    Edited by: mageshB on Dec 28, 2010 6:10 AM

    Yes, of course.
    Kindly look into the view cluster:
    VC_GRFNREPCOLUMNSC - Reporting: Customizing of report columns
    VC_GRFNREPCUST           - Report: Customizing

  • Report Column "attributes"

    I'm sure I am missing something basic here, but no amount of searching has yielded a result:
    I have a SQL Query report for a product with length, width, height column data - two queries.
    1. some products don't use these fields (ie they are null), when showing a single record I assumed if you used the Conditional Display under Column Atrributes, set it to "value of item in expression 1 not null" and then set expression 1 to #length# the item would not appear on the page when length was null and naturally would appear if a value existed ?!
    2. I also have a javascript function to convert mm to inches and display the result in layer when you hover over the length, width, height items. It uses a OnmouseOver/OnMouseOut in the <TD> tag (based on tooltips), but I don't seem to be able to get this to appear when using the tabular form element fields, again under column attributes?!
    Any pointers greatly appreciated....

    Thanks for the feedback Scott,
    The theory is this - I'm working with the Online cart example and when displaying the product detail (ie a 1 record report) some items have L, W, H and others don't so naturally I'd like to tidy the page and not display the null items (and/or labels). there is actually about 7 columns like this so using a decode could get a bit messy!
    Strangely enough when I use the Conditional Display for the column (albeit incorrectly) the item is removed from the page as I would expect in a null situation - so I think unless I'm barking up the wrong tree the functionality is there, I'm just not using it correctly. I've tried # values, &values for the column in expression 1 but to no avail, so I figured this was the area where I was going wrong.... I guess the question is can you reference the current item value in the Expression 1 column attribute to determine if it is null and hence not display it ??

  • Conditionally Formatting One Column Based On The Value of Another Column

    I have the following requirement:
    I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
    I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
    CASE WHEN "Actual Sales" < "Budget Sales" THEN
    RED
    ELSE
    GREEN
    END
    Thoughts anyone?

    CASE WHEN (COL1 - COL2) < 0 then Red else Green end
    regards
    John
    http://obiee101.blogspot.com

  • How to (un)hide report columns based on checkboxes?

    Hello,
    I have a simple report that selects 4 columns from a table.
    I would like to create 2 check boxes (at the report level, not at the row level) corresponding to 2 of the 4 report columns: When they are checked, the corresponding columns are visible. When they are unchecked, the corresponding columns are NOT visible.
    Two questions:
    1.
    This would require submitting the page automatically upon (un)checking either check box. How do I do that?
    2.
    I have attempted to use the Conditional Display properties of the report columns with hard coded values, but they don't seem to work whether the Show property of the columns is on or off. Any idea why and how to get around it? (I am using 3.2. Could this be a bug that has been fixed in 4?)
    Thanks!
    Gabor

    Hi,
    I can not find post where I have explain how sample works.But here it goes:
    You need load jQuery in page template or page HTML header if you are not using Apex 4.
    Create new blank page. In my case new page id is 70.
    Create HTML region to new page called Columns. Use wizard defaults
    Create hidden item Px_REPORT_REGION_NAME. Use wizard defaults.
    In my case hidden item name is P70_REPORT_REGION_NAME .
    Create computation before header for hidden item. Computation Type "Static Assigment".
    In computation write name you like use to your report. My case I did write "Employee report".
    Create SQL Report. In region title place your hidden item like
    &P70_REPORT_REGION_NAME.In my case I did use query
    SELECT *
    FROM empCreate check box. In my case it is called P70_SHOW_HIDE.
    Use from LOV query
    SELECT heading,
      display_sequence
    FROM APEX_APPLICATION_PAGE_RPT_COLS
    WHERE application_id = :APP_ID
    AND page_id          = :APP_PAGE_ID
    AND column_is_hidden = 'No'
    AND region_name        = '&'||'P70_REPORT_REGION_NAME'||'.' -- Change P70_REPORT_REGION_NAME to your hidden item name
    ORDER BY 2Place to report region footer
    <script type="text/javascript">
    function hideCol(pThis){
       var lRepId = '#report_data_#REGION_ID#';
       var lCol   = pThis.value;
       if(pThis.checked){
         $(lRepId + ' td:nth-child(' + lCol + ')').show();
         $(lRepId + ' th:nth-child(' + lCol + ')').show();
       }else{
         $(lRepId + ' th:nth-child(' + lCol + ')').hide();
         $(lRepId + ' td:nth-child(' + lCol + ')').hide();
    </script>Edit checkbox item and place to HTML Form Element Attributes
    CHECKED onclick="hideCol(this);"Your report template most inner table tag must have id attribute
    id="report_data_#REGION_ID#"Then you have result like this
    https://apex.oracle.com/pls/otn/f?p=40323:70
    Regards,
    Jari
    Edited by: jarola on Oct 27, 2010 11:13 PM
    Note about Apex 4 and jQuery added

Maybe you are looking for

  • BEX Query Views - Reqd in PRD but need to create in Dev - Data Issues

    Hello Bw Gurus  BI 7.0 ECC 4.7 We have a BEx Query in BI production which uses a work centre hierarchy. The user wants to create query views on this query to use in BI production. Our normal transport procedure of a new development object would be BI

  • My remote cd says: The operation can't be completed because the original item for "Audio CD" can't be found.

    I'm trying to access a cd (book) from my macbook air 10.7.8 using another macbook on the same network In my System Pre. I don't see 'sharing cd or dvd' when I tried to download the software it said that I already have a newer version. I see the remot

  • Update-grub (grub-mkconfig -o /boot/grub/grub.cfg)

    okay   so i use a bash script to generate my grub config     its just an alias to grub-mkconfig -o /boot/grub/grub.cfg  but with the last update    (today) i am now getting this [fennectech@FennecNET_Mobile ~]$ sudo update-grub Generating grub config

  • Dent detection using IMAQ

    can anybody suggest how to detect dent or depression on a metal surface using IMAQ Vision.The metal surface is circular with diameter of 2 inch. The surface may carry stains which is perfectly alright but dent is the problem.

  • Invoice and Credit Memo

    Hi Gurus, We get 1 invoice with more than 1 line relating to a PO. Line one on invoice and PO is correct, but line 2 on the invoice is goods that we have returned and will never receive it and therefore the supplier has given us a credit note. The PO