Conditional edit in a report column

Hi to all,
I'm a newbie of Apex, so i'm sorry if this question is too stupid.
I have a report where the first column has a link to the form that edit the row of the report.
I would like that the presence of this link depends from the value of another column in the same row. Example: in the product report of 'classical' sample application of Apex, I want that the edit icon does not appear when the category is 'Audio'.
I think I have to use the conditional display section of the first column, but I don't know which is the syntax referencing to a value of a column report.
Thanks in advance
Paolo

See Conditional display of row-column combination?

Similar Messages

  • Condition of amount in report column

    Hello,
    I have created a report in xml template and registered in oracle apps.i have created a rdf report which is showing two column values in output.the following requirement as follows?
    First condition:
    There are tow columns A and B.If column A having amount 100 and column B is 20.The requirement is to show amount in Column B is A+B(100+20)=120 while column A should be remain unchanged .i.e 100
    2nd condition:
    if column A having 100 and B having 0 amount,then column B should be 0(no addition of column A) while column A should be remain unchanged .i.e 100
    Third condition:
    If column A having value 100 and B is -30,then column B should show (100-30)=70 while column A should be remain unchanged .i.e 100
    So it might b tackle with the formula column.How can i achieve this by writing pl sql if these three above conditions are true?

    HI
    It is very simple if you understand the logic.
    Either use Decode function as above function, ..Your requirement is just print a always and print b with sum of a&b if b <>0.+b)
    Method 1:
    Select a, decoder (b,0,0, a, ab+b) from table
    method 2:
    in create formula column say f_b
    new_b number :=0;
    Begin
    If :b <>0 Then
    new_b := :A +:b
    Else
    new_b :=0;
    End if;
    Return New_b
    I have created a report in xml template and registered in oracle apps.i have created a rdf report which is showing two column values in output.the following requirement as follows?
    First condition:
    There are tow columns A and B.If column A having amount 100 and column B is 20.The requirement is to show amount in Column B is AB(100+20)=120 while column A should be remain unchanged .i.e 100+
    +2nd condition:+
    if column A having 100 and B having 0 amount,then column B should be 0(no addition of column A) while column A should be remain unchanged .i.e 100
    Third condition:
    If column A having value 100 and B is -30,then column B should show (100-30)=70 while column A should be remain unchanged .i.e 100
    So it might b tackle with the formula column.How can i achieve this by writing pl sql if these three above conditions are true?

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

  • 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

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

  • 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

  • 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

  • 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

  • Conditional Link on Interactive Report

    I'm trying to make the link column conditional on an interactive report. That is, I only want the pencil icon on the rows which have a field that is greater than 30. So, assume my query says:
    select DEPT_ID, USER_LEVEL
    from my_table;
    I only want the link icon to appear on rows that have USER_LEVEL > 30. I tried (unsuccessfully) to get this to work by adding a condition of "Expression1 = Expression2", and I used the #USER_LEVEL# substitution string. (Note: I know this would be exactly what I want because I want the condition to be on all values > 30, but I couldn't even get this to work when I put #USER_LEVEL# in Expression1 and "30" in Expression2 and looked at the records that had a USER_LEVEL value of exactly 30).
    In the end, I had to create a much more complex query like this...
    select
    case
    when USER_LEVEL >= 30 then
    '<a href="f?p=&APP_ID.:21:&SESSION.::&DEBUG.::P2_DEPT_ID:' || DEPT_ID || "><img src="#IMAGE_PREFIX#menu/pencil16x16.gif" alt="Edit" /></a>'
    else ' '
    end as edit_icon,
    DEPT_ID, USER_LEVEL
    from my_table;
    This doesn't seem right to me. Can someone confirm that I'm doing this the right way?

    Hi -
    It really bugs me this forum has such a problem with code examples, so for a while at least I posted quick example on Google:
    [Conditional Column|http://docs.google.com/Doc?id=dd2tkvv6_212dbzw2ftq]
    Not to complicate too much, but if you wanted to not have empty column except one row, you could of course apply this trick to the column that actually holds the user name in your table... in other words, the user could click right on their own name to go to edit screen, but every other user name but theirs would not be a hyperlink. But that is as they say an exercise for the reader :)
    Good luck.

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

  • 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

  • Selective Condition with in a Report

    Looking for a good suggestion here, don't recall seeing this in the support documents so far.
    When you set the Condition for a Link column in a report, the condition appears to be absolute for the whole column. For example, we have a 'view only' user level, and the Condition checking that value will prevent the column with the 'Add to Cart' buttons from appearing. However, we also need to check the individual items to see whether their status is 'In' or not to determine whether the .gif appears or not. (Another report elsewhere in the website uses a similar function, only showing the button when the entry matches the :APP_USER)
    What are some suggestions for having a Link image appear only under certain conditions within a Report column?
    ...Thanks in advance, all the great support on these forums has been a huge help!

    What are some suggestions for having a Link image appear only under certain conditions within a Report column?If you want to conditionally render individual values rather than entire columns based on the value of other columns, build the logic into the SQL query using <tt>case</tt> or <tt>decode</tt> so that either the value or null is returned depending on the condition, or use a custom report template with conditional column templates, or a custom named column template.
    Thanks in advance, all the great support on these forums has been a huge help!You'll get even more effective support if you provide as much relevant information as possible up front. This should include:
    <li>APEX version
    <li>DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) used
    <li>Theme
    <li>Templates
    <li>Region type
    where the last includes being clear on whether a "report" question relates to a standard report or an interactive report.

  • Conditional links in sql report

    Hi all,
    i have created a report with 5 columns. First 2 columns are copy and edit links, rest 3 columns are the corresponding row value. If i click on copy then the primary key of the selected row is passed over to the next detail page and details are shown there. Similar is the case with edit link.
    But i want to show edit link with only those rows, which the user have access. The table shows all the detail, but the link should only come when the user has the privilege to edit it. Can i provide conditionality in SQL Report link column?
    Do reply. Thanks in advance
    With Regards,
    Sunil Bhatia

    Dear Sunil Bhatia!
    I'm not sure if it is possible to make a column link conditional so I would suggest you a little workaround. On the detail page where your edit link leads to create a validation (page processing). This should be a page level validation of type SQL or PL/SQL as you like. This validation could check the user rights with SQL and depending on the result of the validation show an error message like "Sorry, You don't have enough rights to edit this row!" or it could display the detail page to edit the row.
    I hope this will help you along.
    Yours sincerely
    Florian W.

  • 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

  • Dynamically assign column heading to Report columns

    I need to assign values to column headings of various Report Columns of my Report region based on current value of one of my application items. How can I do it?

    Never mind, there was another post like this. Duplicate. Just in case someone is looking for the answer, here is what worked for me:
    Assume the Application item is called app_item_My_dynamic_head_col1.
    Add a page computation before the page loads to set the value of the application item based on whatever condition.
    Edit the report column.
    In place of hard coded column heading "Project Name" (that was my column heading), replace it with
    &app_item_My_dynamic_head_col1.
    The key here is the period after &app_item_My_dynamic_head_col1.
    As the page loads, the column heading will be value of the app_item_My_dynamic_head_col1 (as assigned by the computation).

Maybe you are looking for

  • Pictures not displaying in non-thumbnail sizes

    One of my clients has an iMac G5 running 10.4.11 and iPhoto 5.0.4. He's got about 3200 pictures in his iPhoto library which is about 12GB in size (they are all very large pictures). He's been using iPhoto without problem for years then suddenly he no

  • Error Message with multiple line

    Hi How to display a error message with multiple line? Example      Goods movement not possible for material 101      Goods movement not possible for material 102      Goods movement not possible for material 103 is it possible is ABAP? If so please a

  • Web Dynpro file save dialog - for portal

    Hi everyone, I am currently building a Web Dynpro application in which I need to display a File Save Dialog popup on the Netweaver Portal. Now, I used the standard file_save_dialog method from the class CL_GUI_FRONTEND_SERVICES, but this gives me a d

  • Upgrade to Apex 4.1 results in  "Error processing SSO authentication"

    We recently upgraded our Apex environment to 4.1 from 4.0.2. In our previous environment we used SSO authentication. Some how in the new Apex 4.1 we can get to all our applications with the url https://test.home.org/pls/apex put any application which

  • How to Hide, or Don't show colums in ALV Grid?

    I am using the standard cataloging and Function Module, REUSE_ALV_DISPLAY to pass an internal table to display fields to my ALV output. However, I'd like to give the user options on what the report will calculate, thus having the need to only diaply