Report Column Conditional Display

Hi,
After reading a load of other posts, it seems like there is no way to have a column display conditionaly based on the other column values.
What I am trying to acheive is when an "Already Authorised" column is set to N, a link column displays with an "Authorise" button.
What I did previously was always show the button and just not process anything (conditional on the process)
I think I can acheive what I want by building up a link in my report query
SELECT CASE
         WHEN chk_tab.completed_flag = 'N' THEN '<a href="&MYAPPID. other url stuff"> Authorise  </a>'
         ELSE ''
       END edit_link,What I don't know how to do is either build up the href string? Or is this necessary, can I somehow just submit the page with a request from it?
Thanks
Richard

By accident, I managed to find a perfect solution for this...
http://htmldb.oracle.com/pls/otn/f?p=31517:24:104884642096669
Denes has written a nice function to generate a URL for a report.
So I now use
SELECT CASE
         WHEN chk_tab.completed_flag = 'N' THEN return_link_fn(54,'P54_MYITEM',chk_tab.column_value)
         ELSE ''
       END edit_link
from chk_tabWorks a charm!! :)

Similar Messages

  • Classic Report - Column Conditions Not taking Effect when Changing Pagination

    Apex Version:  4.2.1.00.08
    DB Version: 11g Release 11.2.0.3.0
    Hi,
    I have a classic report that has some columns that conditional hide/show depending upon the value of a page item.  When the report is first displayed with the first pagination set(Rows 1-100), the columns display as they should.
    When moving to the next pagination set(Rows 101-200), the columns no longer display as they should and it seems that the condition is not taking effect.  Partial Page Refresh is set to 'Yes' for the report.
    Any ideas on why this might be occurring?

    tvanderl
    Assuming you mean that columns are rendered while you expect them not to.
    Are the conditions based on page items.
    It could be that the session state of those items is different between when the page is first rendered and when de refresh due to the pagination is done.
    See if adding the in the condition used page items to the page items to be submitted for the region helps.
    Others wise see if you can replicate the issue on apex.oracle.com so we can see what you mean.
    Nicolette

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

  • Report column breaking - display text centred in cell

    Hi,
    I am looking for some help achieving the following:
    I have a report which has column breaks on the first three columns. Currently, when the report is displayed, the first column value is displayed in the top row with the rows underneath blank and so on for columns 2 and 3. Then the data for the other columns is displayed as normal.
    What I want to do is have the column values that are used in the break spanning the rows they break over so the text is displayed centred (vertically)
    ie:
    Col1     Col2     Col3           Col4     Col5
                                    dat1     dat2
                                    dat2     dat3
    val1     val2     val3          dat4     dat5
                                    dat6     dat7
                                    dat8     dat9
    val2    xx        xxx         xx        xx
    ________________________________________________ (Hope this works in ascii!!!) - Col1,2,3 etc are the columns - ignore the vals and dats - they're just data placeholders.
    All help much appreciated! :)

    Hi,
    Something like: http://htmldb.oracle.com/pls/otn/f?p=33642:112 ?
    If so, see: Re: How to achieve Page/Form/Report layout?
    Andy

  • Portal reports: Column conditions: restricting user-data

    1.) I created a portal-report based on a view.
    2.) This view consists of an attribute, which represents
    the SSO-Username
    3.) I am trying to build a LOV to restrict the data
    from the view, e.g. the user can only see his/her
    own data
    4.) In earlier days a used the phrase/word "user", which
    represented a DB-user (of-course)
    ===> does not work
    5.) If I use WSGSSO.get_user (because my application
    is registered as a partner application) ===> does not work
    6.) So what is the "reserved" word to be used within Portal
    itself to restrict the data within the properties
    "column conditions" ??
    Regards Jvrg

    My E-mail-addresses:
    [email protected]
    [email protected]
    Thank's

  • Clasical Report column headings display

    Hi ABAPERS
        iam working on clasical report. in that i have to display 16 field headings.
    when executing the report, the column headers should be frozen at the top so that when the user is scrolling down, they can see what the column title is.
    how can i over come this problem.

    Hi,
    you mean the column headings should be displayed even though
    the user scrolls down the output.
    For classical reports, according to me it is not possible.
    We will be using the write statement to display the records,
    so it is static for the report.
    If you want the output what you are expecting then go for ALV's.
    Regards,
    Venkatesh

  • 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

  • Complex conditional display in report table

    Hi,
    I built a report in a region, and want to make one of the columns conditionally display based on attributes from two other columns in the table. The drop-down for the conditional display only lets me refer to the current item. Is there a way I can reference the other cells in that table row in a PL/SQL expression (e.g.: something akin to #COLB# is not null and #COLC#>1000 ?)
    Related question: I'm assuming the reason I can't directly change the source for the report region and can only modify it from the Query Definition tab is because I used a wizard to create it. Is there a way to "undo" this and make the source for the report fully editable? That would also solve the problem, since I could just add a function-derived column to the query.
    Thanks in advance,
    Keith

    One final update and rephrasing of the problem, because maybe there's another way to solve this.
    I have a column in a report that links to another page, but the link is only shown if a certain condition is met (which is based on other cells in this table row). I can test for those conditions in my original SQL query, so that a null value in my link column results in no user-clickable link being created. (I have to make sure that a null value appears as null on the report page, too.)
    This works fine if the link text is just that: text. Because not meeting the condition returns null, so no text == no link.
    Now the only problem I have comes if I want to use an icon (e.g.: the edit icon) instead of link text.
    What I really want is for the icon to only appear if a certain condition is met. However, the icon replaces the column value so I can no longer use a null value to prevent the link from appearing.
    The original question asked whether I can use other report cells (#foo#) in the conditional display for a cell. If that's not possible, any suggestions on how to achieve the desired effect without resorting to JavaScript?
    Thanks.
    Edited by: kswartz on Jun 20, 2009 1:56 AM

  • Display the second report as modalform and filter with primary key value of first report when you click on first report column link

    Hi All,
    I have two reports.
    1. order report
    2. order detail report
    when you click on the order report column it display the order detail report as a modal form.
    i was done below steps.
    1. In page header i was written the below code
    <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/
    redmond/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>
    <script type="text/javascript">
    $( function() {
    $('#ModalForm1').dialog(
    autoOpen : false ,
    width :470,
    height: 500,
    resize :false,
    function openForm1()
    $('#ModalForm1').dialog('open');
    function closeForm()
    $('#ModalForm1 input[type="text"]').val('');
    $('#ModalForm1').dialog('close');
    </script>
    2. order report.
    3. order detail report
       select * from order_details where order_id = p_order_id;
    region header
    <div id="ModalForm1" title="Ordered Items" style="display:none">
    <p class="msg"></p>
    footer
    </div>
    4. created the hidden item in order detail report.
    5. in order report column attributes i was given link like below.
    javascript:$s('p_order_id','#order_id#');openForm1();
    when i click on the order report column link it passing the row primary key value to hiddent and open the report as modal form. however it is not filter the report with hidden item. it showing the no data found.
    problem is hidden item value is not submitting. once we submit that value it showing the 2nd report with filter data.
    can any help me to achieve above requirement.
    apex: 4.2
    oracle 11g
    Regards,
    Vijay.

    Vijay,
    Issue 1: Your usage of $s() JavaScript API seems to be wrong. For the first parameter, you need to use the name of the hidden page item and not p_order_id.
    javascript:$s('P1_ORDER_ID','#ORDER_ID#');openForm1();
    Issue 2: Seems like you are not setting the hidden page item's value in session state. Assuming your hidden page item is called P1_ORDER_ID, Under "Region Definition" tab of your "Order Detail Report" under "Source" tab, for page items to submit, enter the name of the hidden page item P1_ORDER_ID.
    Thanks!
    JMcG

  • Script to find report columns with XXS vulnerabilities

    Hi,
    Report columns with display as "Standard Report Column" are vulnerable to Cross Site Scripting attacks. I have written a simple script to find these report columns and described an easy way to change them all at once. Check: http://wiki.shellprompt.net/bin/view/Apex/XssExamples
    Regards Pete

    Hi Pete,
    good that you bring up that security issue!
    I was talking to Joel during ODTUG about the "Standard Report Column" default the wizard uses and he said that this might be changed in the next version to use the more secure "Display as Text (escape special characters, does not save state)"
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Blob Column to display Picture

    Hello,
    i have crated a table name Product , and i kept one column type Blob to upload pics for product. using wizard i created form with report.
    i can see the brows option on form but i can not see picture in report which is created durring wizard.
    how can i show the picture in report ? can anyone help me.
    Thanks,
    Suhaib

    Suhaib,
    <li> Check if the image function is fetching the images correctly by opening the image Location(fetched by the procedure) in a new browser tab
    It would be like, http//<your server>:<port>/<dad conf>/<schema>.<image fetch function>?<parameters >=
    In Andy's application this would be
    >http://apex.oracle.com/pls/otn/ATDSCHEMA.DISPLAY_IMAGE?inID=77
    <li> Check the report column's display type and change it to standard report column.

  • Compute average of a report column

    Hi,
    I got stuck with a problem. My problem is to compute average of a report column and display it on the bottom of the report. I searched the solution on apex forum but not get any solution.
    So, Please help me. It's urgent for me.
    Thanks
    -PK

    I've thought of the following solution. It's not the prettiest but I think it achieves what you're after or at least might come close.
    Edit the report region source to something along these lines:
    select salesperson as salesperson, total as total, 1 as sort_val from sales_figures
    union
    select 'Average' as salesperson, avg(total) as total, 2 as sort_val from sales_figures
    So the above query returns the sales person and their sales total unioned with a query returning the text 'Average' with the average sales totals. The sort_val value has been added to be able to sort by this value to ensure the 'Average' figure appears last by editing the report attributes to show salesperson & total, not show sort_val but sort by sort_val first.
    You won't be able to have sort on the report columns though as this would move the 'Average' figure from the bottom of the report where it's expected to be displayed.
    Does the average need to be part of the report?
    Could you calculate the average and display it within a page item below the report instead?

  • 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

  • Conditionally displayed columns of interactive report not displayed

    We have an interactive report in which few of the columns have been defined with conditions for display.
    But on the interactive report page, when the conditions are satisfied these columns do not display in the report by default.
    These columns are found in the 'Select Columns' -> 'do not display' pane. Everytime the report is run, these columns need to be selected using the select column.
    Is there anyway to make the columns appear in the report by default, when conditions are true.

    Thanks Jari for your help.
    For this issue, we finally came up with a work around.
    we removed the conditions from all the columns then ran the application report page.
    Clicked on Select Columns and moved the columns from the do not display pane to the right pane.
    Ordered them as needed. Then saved the report as primary.
    Then again went to the edit page-> interactive report and applied the conditions to the necessary columns.
    and it worked.
    When I went to the report these columns are displayed by default.

  • Conditional display of a column link in sql updateable report

    Hi There,
    I've attempted to look thru the Apex forum about using an Authorization Scheme in an SQL Query (Updateble Report) where I can conditionaly enable (display) a column link based upon a value in the report but alas I cannot find a solution.
    What I have is a SQL Query (updateable report). What I want to achieve is dependant on the value of one of the columns in the report query conditionaly display a column link for the row being displayed. For example if the report dispayed the data from emp, dept only display a column link for rows where the deptno = 100 otherwise don't display the column link. Is this possible to achieve?
    I've tried to define in the authorizatuon scheme in the where clause of an SQL Statement to reference the report column as #deptno# but this doesn't work.
    TIA

    Boketi,
    I was unsuccessful yesterday in demoing what I believe you want to achieve. It appears that an authorization scheme will not process row by row within a standard report so as to allow a conditional display of a link or any other column attribute. You can conditionally display a column by the use of a page item but this method appears to be all or nothing.
    I was successful when I coded the return of the empno via a Case statement but the Link still appeared even though there was no value (empno) to link with. So essence the link to you to a blank for with no PK to read the database by.
    SELECT CASE WHEN deptno = 10 THEN empno ELSE NULL END empno,
           ename,
           job,
           hiredate,
           sal,
           comm,
           deptno,
           phone_nbr
    FROM   empJeff

Maybe you are looking for

  • How to add Pricing Agreement in Value Contract Item level

    Hi Exports,             In my requirement i need to Add Product category ID at item level in  a Sales Contract. we done with this through CRM_ORDER_MAINTAIN             we are able to add this For This Item we need to add Pricing Agreement  as Below

  • FB03 - Increase length of the field "Account Short Text" in FB03

    Dear Expert! I understand that Tcode: FB03 is SAP standard tcode. However, i just want to ask, is it possible to increase length of the field "Account Short Text" to 42 characters in FB03? Because my vendor/customer name is quite long, and when i vie

  • Problem with "locked records" on Oracle with UTF8

    Hello, Can somebody help me with "record is locked by another user" problem on Oracle 10.1.0.2 ? Oracle is installed with UTF8 character set, and is running on Windows Server 2003. Whenever I try to edit numeric column I get the message "record is lo

  • Need help in solving java.io.NotSerializableException

    Hi, Weblogic 9.2 I need help in solving the java.io.NotSerializableException: weblogic.jndi.internal.ApplicationNamingNode I dont know why ApplicationNamingNode has to be serialized. Full stack trace will be provided if needed. thank you

  • JSF Best Prac.: Single ADF Query, Many Tables with Different Qry. Params

    One query (ex. queryPeopleBySurnameFirstLetter) needs to be used multiple times on the same page to generate different tables. Each table represents a different letter (A,B,...Z) and would list the first 5 for that letter. Using design view, the firs