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

Similar Messages

  • Conditional Display of Interactive Report Based on Field Above

    Page one has simple text box entry for a Vendor # with a button that branches to a page displaying information for that vendor. In a region below, I would like an interactive report that displays all of the item and description that vendor provides to our company. I have tried to use the Conditional Display to disply only items in the report but have been unsuccessful. Your help is appreciated!
    Thanks.

    Hello user2961006 (please tell us your name),
    I understand your question to be, "how do I make a report on page two only show rows related to an item entered on page one". Putting a condition on a region isn't the answer here - you want the report to always display, but just with different rows depending on the vendor number entered. A condition on a region is used to either display the region or not.
    What you need to do is put a WHERE clause on the SELECT statement that your report is using to get its data. For example, if the item holding the entered vendor number is P1_VENDOR_NUM, the SELECT statement for your report would look something like:
    SELECT item, description
      FROM my_items
    WHERE vendor_num = :P1_VENDOR_NUMNote my_items is a fictitious name. This will tell the DB to only retrieve rows where the vendor number is the vendor number entered by the user.
    Hope this helps, I'll gladly accept reward points if it does ;-)
    John

  • Interactive Report based on pl/sql function body

    Can an interactive report be based on a pl/sql function body returning the query sql? Or does it have to be based directly on the SQL?
    Thanks

    Hello "unknown user",
    As far is I know an Interactive Report can only be based on 'regular' SQL. If you have a Report based on a 'PL/SQL function body returning SQL' the option to migrate the report to an interactive report is not there.
    Regards,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • MAKE BUTTON CONDITIONAL DISPLAY IN A REPORT BASED ON STATUS OF COL VALUE

    hello,
    can anyone help me out with this issue.
    Like I have a normal SQL report with buttons update,delete,insert and I wanted to display these buttons conditionally based on the value of the "status" column.
    For Example: if the status columnvalue is 'DEV' then only display the buttons otherwise don't display them.
    thanks,
    Orton

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

  • Setting default columns displayed in interactive report

    Hi APEX community,
    I recently created an interactive report based on an sql query as follows:
    select
    "STOCK_CLIP_ID",
    "TITLE"
    from "STOCK_CLIP"
    After creating the report I added an additional column:
    select
    "STOCK_CLIP_ID",
    "TITLE",
    *"UPLOADED"*
    from "STOCK_CLIP"
    The new column does not display by default, I have to add it under Actions > Select Columns. I cant find any setting to add my new column UPLOADED to the default columns to be displayed so that when a user first navigates to the report they dont have to add that column in order to be able to see it.
    Sorry this is perhaps a stupid question with an obvious answer, i'm new to the interactive reports.
    Thanks!

    Hi,
    Login to Apex builder. Run page where is your interactive report.
    Select columns you like to show default from Action menu. Save report default layout from Action menu.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Interactive Report Based On A Collection

    Hi guys
    Using Apex 3.2
    I have a classic report based on a collection, which works fine.
    I am now trying to create an interactive report based on the same query (collection), but no data is returned.
    I there anything special I need to do with an interactive report.
    Cheers
    Gus

    Go into Interactive Reports Actions Menu > Select Columns > Add all missing columns to right side and apply (Display In Report)
    OR
    Check interactive report attribute settings
    Thanks

  • Interactive report based on dynamic query

    Hello
    I am using Apex 4.1 and have a requirement to create an interactive report based on a dynamic query. This option is available in Classic report but in Interactive this feature is not there. Tried using collections or just a view (thought of changing the view definition during "On load", but structure of the report is already defined based on the definition of the view at design time).
    Is there any way of achieving this?
    Appreciate any help!
    Thanks
    aks

    Try looking at this: http://rakeshjsr.blogspot.com/2010/10/oracle-apex-interactive-report-based-on.html
    Thank you,
    Tony Miller
    Dallas, TX

  • Require assistance in Interactive Report based in APEX 3.2

    Hi All,
    Thanks in advance
    I have created editable Interactive report based on Form with report .
    once report created , I have modified query with the column named TempNetto ,Temp Brutto .. Below is the query
    select "IDSUB",
    "JAHR",
    "IDMITARBEITERLISTE",
    "EKPREIS",
    "WEBUCHUNGEN",
    (WEBuchungen*EKPreis) TempNetto , --modified
    "NETTO",
    DECODE((WEBuchungen*EKPreis),0,0,(Netto+(Netto*VerwaltungskostenZuschlag)+(WEBuchungen*InfrastrukturkostenZuschlag))) TempBrutto, --modified
    "BRUTTO"
    from "#OWNER#"."SUBS"
    I receieved the below message "You have requested to change the Interactive Report query. If you added columns to the query, they will not be displayed when the report is run. You will need to use the actions menu and either select the columns or click Reset. If you removed any columns from the query, it will disable existing filters, highlight rules, and other report settings referencing those columns. Please confirm your request. "
    I want the column started with temp should appear in report . I have checked under search bar Action menu is checked and options like Select column and Reset is checked
    Kindly provide some help
    Cheers
    Sachin

    Hi,
    When you've selected all the columns (Select Columns) you then need to save the report...not reset it. Go back and make sure all columns are on the right and then:
    - Save Report
    - As Default Report Settings
    - Apply
    Mike

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

  • Interactive Report based on View

    Hello!
    I've just started to rewrite my Forms applications to Apex.
    Based on an existing view I want to create an Interactive Report, but there is only the choice between 'Table' and 'SQL statement'.
    Is there a way to use the view in a direct manner ( not in a sql statement as 'select * from VIEW)?
    Regards
    Pietja

    Hello Pietja,
    In my APEX env (3.2) an IR can only be based on a SQL Query. You can use the Query Builder to select a table or view, but still it ends up with a SQL Statement.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Placing buttons in a region displaying an Interactive Report

    Hi,
    I have a page on which I am displaying an interactive report.I would like to place buttons on this region where the report is displayed-
    - The first button right of the search bar of the interactive report
    - The second button right of the first button.
    - The third (exactly ) below the second button (still right of the search bar)
    I am aware that if this where an HTML region,then I would have had the flexibility to place the third button in a new line without a problem,but can I achieve this in a region displaying an interactive report?
    Is there any way to do this?
    Regards,
    Priya Jetley

    Create the buttons as region buttons in the IR region, with the following properties:
    Button Position: Right of Interactive Report Search Bar
    Button Alignment: Left Right
    Enter *style="display: block; float: right;"* in the Button Attributes of the third button.
    Edited by: fac586 on Nov 11, 2008 8:04 AM
    Changed to fix slight layout glitch in Firefox 2.
    Edited by: fac586 on Nov 11, 2008 9:06 AM
    Changed back as the slight glitch in FF2 is preferable to not working in FF3 and Safari

  • Conditional display column in report

    Hi,
    If we have a single row report of 30 columns, and I want to display only the one with any values but null and hide the null ones, Is there a way to do it?
    It's the same issue discussed in this thread conditional display column in report
    thanks,
    Fadi.

    Samara - I suspect there are a few ways to do this, but none obvious or very easy as far as I can see.
    You can create dynamic SQL (as Arie and others have suggested) to only include the columns that are not null.
    You can build and output the HTML directly to the page, choosing only to include the values that are not null.
    You can create a set of conditions that you can apply to the report columns. A very crude example might be 30 hidden page items like 'SHOW_COL1' etc. (not great, I know), or perhaps you could set a hidden page item to a value like '01:02:03:'etc., with the number only being included if the value is not null (so that col3 being null gives you '01:02::04'etc.), so that the condition for each column is 'Text in expr 1 in contained in Item in expr 2', where expr 1 is '01' for column 1 etc.
    Sorry, that is a very contrived example, but it's just to illustrate that there's generally a way of doing pretty much anything in APEX. You might create your item containing the comparison expression by requerying the data in this kind of way:
    SELECT NVL2(column1, '01', '') || ':' || NVL2(column2, '02', '') || ':' etc.
    FROM table
    WHERE condition
    However, wanting to create a single-row report with nulls hidden makes we wonder what you're actually trying to achieve and whether there's a better way? Could you use a series of page items, for example?
    John.

  • Reports based on PL/SQL Procedure/Function

    Hi all,
    After some serious Google and forum searches, it appears as if this is something that just isn't possible (or easy to do).
    I've been charged with creating an APEX application that displays reports. There are a series of Procedures that will be written to return a result set, updated to take into account some filters that a user would provide. The key here is that the report won't be displayed until AFTER a user inputs some filters on a form and hits a Submit button. The project requires this functionality - allowing the report to be displayed and THEN filtered using the APEX IR Control is not desired (not my decision).
    There doesn't seem to be an easy way to define a report in this manner. It appears that the query for a report query needs to be known ahead of time.
    So, with that setup - is there a way to define an APEX report based on the return result of a PL/SQL function? OR is there a way to define a report using a SQL Query that is built based on user inputs?
    Any help would be appreciated.
    - Pedro

    Hi,
    Check if this post help you.
    Dynamic html table
    And normal reports can be also created from select that function is returning.
    http://www.oracle.com/technology/products/database/application_express/howtos/dynamic_report.html
    Br, Jari
    Edit:
    Maybe useful
    http://www.apex-blog.com/oracle-apex/dynamic-report-regions-tutorial-32.html
    http://www.oracleapplicationexpress.com/2009/02/interactive-report-based-on-plsql.html
    Edited by: jarola on Sep 9, 2009 5:14 PM

  • How to default field values based on a sql query?

    I have a create form that has employee_id and supervisor_id fields. I am defaulting the employee_id based on the login info (no problem there). Now I want to default the supervisor_id also. Supervisor id is based on a sql query that takes the employee_id as a parameter for the where clause.
    How do I implement this in jDeveloper?

    I figured how to do this. I created a new EO, associated it to my base EO via association. Then put this code in the base EO's create() method:
    // Set supervisor id based on SupervisorEO
    SupervisorEOImpl supEO = getSupervisorEO();
    Number newSupId = supEO.getSupervisorId();
    setSupervisorId(newSupId);
    This seems to be the simplest.

  • Displaying an interactive report differently depending on user connected

    Hi,
    I have an interactive report on a table which holds server information. This table has a column which is called "Restricted". It has only two possible values (Y or N). It determines whether or not a user has the privileges to view the server password of that server.
    We are using database authentication for our APEX 3.2.1 application. We have 2 predefined roles, one with full privileges (Select, Update, Insert, Delete), and one with only Select privileges. When creating a database user account to access our APEX application, one of these 2 predefined roles is assigned to the user.
    What i want to accomplish is to display the Server Interactive Report as follows:
    If the user has full privileges, then they see the contents of the Password field regardless of the contents of the "Restricted" column (Y or N).
    However, if the user only has select privileges, they will not see anything in the Password field if the "Restricted" column is set to Y. Either i will display a Null or a bunch of stars (****). Note: I cannot hide the Password column because i still want to display the password column for those records that have a 'N' in the restricted column.
    I know how to create a condition which determines which level of privileges the user has and make the report display stars in the password field (I used a decode statement in the SQL statement generating the report which sets the Password field to **** if Restricted is set to Y). This only takes into account the role assigned to the user. The complicated part is factoring in the condition of wether or not the Restricted column is Y or N so that users with the right privileges will see everything whereas users without the privileges will see null or stars.
    This is a major issue we are facing right now.
    Thanks for any suggestions, advice.
    Tim

    Hi Scott,
    Thank you very much, I just had not structured my case statement correctly and ommitted that second condition about the user.
    I did this: CASE WHEN "RESTRICTED" = 'Y' and :APP_USER = 'NO_PRIV' THEN '****'
    ELSE ORA_PWD END ORA_PWD, "RESTRICTED"
    The report works fine now! :-)
    Tim

Maybe you are looking for