Using a variable db link for interactive report

I have a requirement where users select an instance a LOV apex (link db) and data in an interactive report query based on the selected db link.

I use a db link in a report query interactive but only if I provide the exact name of the binding. If I'm doing something link select * from foo@:P12_DBLINK it does not work.

It seems that my only option is to use something like apex_collection.create_collection_from_query and then I can build my dynamic SQL query and use a variable for the name of dblink. Then I create just a from IRR of my collection.

This sound correct approach like that or am I missing something?

Any suggestions are most appreciated,

John

Hi John,.

Why not create a classic report based on a function of PL/SQL returns a query.

André

Tags: Database

Similar Questions

  • Model of User Interface for interactive report region

    3.2 where we establish the model of user interface for interactive reports region?

    No matter what on the theme of the box I go to, the region of interactive reports shows the same. What and where do I change the model so that alternate lines use two different colors?

    There is no model for interactive reports as for a 'normal' report You need to edit the CSS and provide your own for this purpose.

    I think that most of the things are marked with the #apexir - firebug with combustion chamber is priceless. This thread may help:

    Re: changing the appearance of the interactive report.

  • When I try to use the Windows Update link for my XP computer I get a message indicating that the location where the Windows Update stores data has changed and it needs to be repaired. How can I solve this problem?

    When I try to use the Windows Update link for my XP computer and after using Windows Mr. Fix - It, I get a message indicating that the location where the Windows Update stores data has changed and must be repaired. How can I solve this problem?

    I'm not that computer literate and do not understand what needs to be fixed.

    This problem just started a few weeks when I noticed that I had any recent download automatic update that I regularly get. So I tried to do it manually through access via my control panel.

    I use ESET Antivirus Node32 software.

    Hello

    1. What is the error message or an exact error code?

    2 have you made changes on the computer before this problem?

    3. you try to check the updates?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Reset Windows Update components and then try to download the updates.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Warning: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756

     

    Method 2:

    File system scan tool checker and then try to press Ctrl + Alt + Delete and check.

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe):

    http://support.Microsoft.com/kb/310747

    Please respond with more information so that we could help you more.

  • By using the search field of the interactive report

    Hello

    I want to use the search field of the interactive report to set this value in a page item, use it to pass this value to another feature.

    How can I do this?

    Concerning

    Eve wrote:
    Hello

    I want to use the search field of the interactive report to set this value in a page item, use it to pass this value to another feature.

    How can I do this?

    Concerning

    Create a dynamic action as follows:

    Event: Before updating
    Selection type: Region
    Region:

    Real Action:

    Action: Run the JavaScript Code
    Code: $s ('PX_YOUR_ITEM_NAME', $v ('apexir_SEARCH'));

    Click on create

    When it is created, change the dynamic action and define the scope of the event on the dynamics

  • ToolTip for interactive reports

    Hi, how can I add ToolTip for interactive report column headings...


    Thank you
    Nihar Narla

    Hello

    This might help
    http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:2311800346467196

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Apex 5 - where can I configure the link column for interactive report?

    Using APEX 5 on apexea.oracle.com

    I can't work where the attributes of column layout link for an interactive report using the interface of the designer of the Page?

    Thanks in advance

    PaulP

    Paul,

    the customer_id column is defined as a hidden at the Start column, and then there is no attribute of link for this column type. You must define the type 'Link' to get the attributes. There is no attribute of link on "Plain text" either.

  • Workaround solution for using PLSQL as a source of interactive report?

    Hi all!

    I have a PL/SQL anonymous block here, I wanted to use as the source for an interactive report. Only, I didn't know that interactive reports supported PL/SQL...
    For example, the code:
    DECLARE
    a_userid NUMBER;
    
    BEGIN
    SELECT userid
    INTO a_userid
    FROM users
    WHERE UPPER(username) = :APP_USER;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    a_userid := 0;
    
    IF a_userid = 0 THEN
    SELECT distinct a.name AS Foodname, a.foodid AS Foodid
    FROM food a 
    INNER JOIN foodunit c
    ON a.foodid = c.foodid
    WHERE a.foodlanguageid = :P18_LANGUAGE
    OR a.foodlanguageid = :P18_SET_LANGUAGE
    AND a.userid = 0
    ORDER BY a.name;
     
    ELSIF a_userid = :APP_USER THEN
    SELECT DISTINCT a.name AS Foodname, a.foodid AS Foodid
    FROM food a 
    INNER JOIN foodunit c
    ON a.foodid = c.foodid
    WHERE a.foodlanguageid = :P18_LANGUAGE
    OR a.foodlanguageid = :P18_SET_LANGUAGE
    AND a.userid = 0 
    AND a.userid = a_userid
    ORDER BY a.name;
    END IF;
    END;
    Of course this code will not work because I do not understand everything IN the statements, but just trying to understand what it is that I'm aiming.
    This code point is that when a user is not logged (and visits as a public user page), it must fetch the 'NAME' and 'FOODID"FOOD table lines. I added a column of this table (named USERID) and all rows having the value '0' for this column.
    Now, when a user logs on, he or she has a fixed username (registered in another table, named 'USERS'). A user is able to add foods that they own to the list.

    Of course, a visitor is not supposed to see all food products that have been added to the table by registered users. So, I wanted to show the separate data. Visitors (unregistered) only see the default values (all the lines in which the userid = 0) and registered users should see both added their own food (my username is 1, then I want to see all the lines where the userid = 1) and the rows with default values (where userid = 0).

    I found a way here:
    http://www.oracleapplicationexpress.com/tutorials/71-Oracle-Apex-interactive-report-based-on-PLSQL-function

    But it is not only makes sense to me. Y at - it is an easy way to explain how the tutorial in the link, or you know an easier way? Like making a procedure or something, or a function or a process page and somehow, refer to that in the SQL source interactive report?

    Any help is greatly appreciated.

    APEX version: 4.1.1.00.23

    Hi again,

    How does this request?

    SELECT DISTINCT a.name AS Foodname, a.foodid AS Foodid
      FROM food a INNER JOIN foodunit c ON a.foodid = c.foodid
     WHERE a.foodlanguageid IN (:P18_LANGUAGE, :P18_SET_LANGUAGE)
      AND (a.userid = :P18_USERID OR a.userid = 0)
    ORDER BY a.name
    
  • Using the page as a condition for interactive report item value

    Hello. I add a button named edit in one of the interactive report column. This button should be displayed under certain conditions. Conditions are 1) If the user is Mencis and 2) value of the page called P2_DUMMY is 2. The value of P2_DUMMY is to 2 when a button is clicked. I defined a dynamic action for this. The problem is that I don't know what the condition of being added to the interactive report query.


    I tried

    CASE WHEN: APP_USER IN ('Mencis"). WHEN BOX: P10_DUMMY = 2 THEN ' < button type = "button" class = "button-default"; ">

    < span > edit </span > < / button > ' END I just get errors.

    If I just put the condition as

    CASE WHEN: APP_USER IN ('Mencis") THEN ' < button type ="button"class ="button-default "; "> < span > edit </span > < / button > ' END

    button is displayed in the report. If I add the second condition, all I get is error. I don't know how Add an element value of the page as one of the interactive report conditions. Please help me on this.

    Mencis Joe wrote:

    Hello. I add a button named edit in one of the interactive report column. This button should be displayed under certain conditions. The conditions are 1) if the user is Mencis and 2) value of the page called P2_DUMMY is 2. The value of P2_DUMMY is set to 2, when a button is clicked. I defined a dynamic action for this. The problem is that I don't know what the condition to be added to the interactive report query.

    I tried

    CASE WHEN: APP_USER IN ('Mencis"). WHEN BOX: P10_DUMMY = 2 THEN '' END I just get errors.

    If I just put the condition as

    CASE WHEN: APP_USER end of '' ('Mencis") THEN

    the button is displayed in the report. If I add the second condition, all I get is error. I don't know how to add a value to the page element as one of the interactive report conditions. Please help me on this.

    Combine the predicates in the CASE expression by using an AND condition:

    case
      when    :app_user = 'Mencis'
          and :p10_dummy = 2
      then
        ''
    end
    

    Hardcode a condition like the :app_user = 'Mencis' is likely to prove problematic for all sorts of reasons, not least including the value of APP_USER is uppercase by default, unless otherwise during authentication.

    Note that the semicolon and extra double quotes in are not valid.

  • Create null values in the database for interactive report link column values

    Hello

    I'm pretty new to APEX and tries to create an interactive report with the form. This report examines essentially for more information for a particular employee. If the employee has any information in the table, the report presents information with a button change beside him. If there is no record in the table for this employee, a create button appears. Now when you click create, a new creation page. This page contains the employee number as a single display field with the value from the previous page. This value is displayed in the page, but it is not in the database. Create the page has view-only number and a couple of other columns. The other columns get inserted into the table with an empty number!

    Can someone please? Looks like the page keeps the value zero for the number of the employee who came during the search of the interactive report. Hope I made myself clear, being the newbie hope I haven't used any incorrect terminology.

    Thank you!
    Robet

    Without the DB column, apex will not determine which DB column the data in this field are mapped to (it would be quite impossible to guess the destination since the name of the element column).

    If you want to assign to the previous element of the page, use the default section

    return: P1_EMP_NUM

    By default the value Type: body of the PLSQL function

    and configure the attributes of source as I said before

  • Using elements of the application of interactive report filters

    Hello

    Can we use elements of application in interactive report filters? If so, how?

    Thank you
    Machaan

    Take a look at the creation of a link to the section of interactive reports in the Application Guide of the user for example generator

    This example binds, resets and clears the saved report parameters 12345. It also creates an ENAME = 'KING' filter on saved report 12345.

    f? p = 100: 1: & SESSION. : I have R_REPORT_12345::RIR, CIR::RIR, CIR:IR_ENAME:KING

    If you have an element of the application P1_ENAME the following apply to the example above

    f? p = 100: 1: & SESSION. : I have R_REPORT_12345::RIR, CIR::RIR, CIR:IR_ENAME: & P1_ENAME.

    If you want a permament for all filter saved reports on the value of point of application, it is best to use the: APP_ITEM_NAME bind variables in your SQL syntax, it really depends on how you define the value of your item and how you interact with it. AFAIK does not request point directly bind variables syntax in the filters, IR etc...

  • Clickable links in interactive reports

    Hello

    I have problems trying to show clickable links in an interactive report.

    For example, if the display text is something like: https://mymachine.abc.com:1158 / em.

    How the hell can I do that clickable in the report?

    When I say 'on Earth', it might suggest that I tried a lot of different things - and I! including copy exactly the formats of the different links of the Oracle document management example - but who don't use regions containing interactive reports.

    Thank you!

    Indeed, it is the other option.
    If you get the HTML tags in your IR columns, check the "display text like" in this column. Must be set to "Column in report Standard" and not "display text (escape...". »

  • Problem with the cascading for interactive report selection list

    Hi all.

    I'm trying to implement the solution of cascading to the tabular presentation list.

    https://Apex.Oracle.com/pls/Apex/f?p=31517:176:103661090335568:

    But instead of the form of paintings, I use interactive report. After executing the query, I get the error:

    ORA-06550: line 1, column 147: PL/SQL: ORA-00936: lack of expression ORA-06550: line 1, column 13: PL/SQL: statement ignored


    My Sql query for the report:

    select 
    apex_item.hidden(1, a."DATA_ID")DATA_ID,
    apex_item.select_list_from_query(10,
      b.WAVE_GROUP,
     'select GROUP_DISPLAY, GROUP_RETURN from dwd_wave_group',
     'onchange="f_set_casc_sel_list_item(this,f11_'||LPAD (a.DATA_ID, 4,'0')||')"',
     'YES',
     '',
     '- Select Group -',
     'f10_' || LPAD (a.DATA_ID, 4, '0'),
      NULL,
     'NO'
     )WAVE_GROUP,
    apex_item.select_list_from_query(11, b."WAVE_USER",
    'SELECT username d, '
    ||'username r FROM dwd_user where groups = '||b."WAVE_GROUP",
    '',
    'YES',
    '', 
    '- Select User -',
    'f11_' || LPAD (a.DATA_ID, 4, '0'),
     NULL,
    'NO'
    )WAVE_USER
    from "DWD_WAVE_MASTER" a, dwd_wave_assignment b
    where a.data_id = b.data_id
    and b.wave_id = 'wave_1'
    

    If I exclude the condition 2nd selection list query and change as below then everything works fine. Query does not give error on sql developer.

    Use: APEX 4.2.6 with Database 11g.

    apex_item.select_list_from_query(11, b."WAVE_USER",
    'SELECT username d, '
    ||'username r FROM dwd_user',
    '',
    'YES',
    '', 
    '- Select User -',
    'f11_' || LPAD (a.DATA_ID, 4, '0'),
     NULL,
    'NO'
    )
    

    Can someone please help!

    Thank you

    Nabila

    The nabila Islam wrote:

    I'm trying to implement the solution of cascading to the tabular presentation list.

    https://Apex.Oracle.com/pls/Apex/f?p=31517:176:103661090335568:

    But instead of the form of paintings, I use interactive report. After executing the query, I get the error:

    ORA-06550: line 1, column 147: PL/SQL: ORA-00936: lack of expression ORA-06550: line 1, column 13: PL/SQL: statement ignored

    My Sql query for the report:

    1. Select
    2. apex_item. Hidden (' 1, a. "DATA_ID DATA_ID").
    3. apex_item.select_list_from_query (10,
    4. b.WAVE_GROUP,
    5. "select GROUP_DISPLAY, GROUP_RETURN from dwd_wave_group,"
    6. "onchange =" f_set_casc_sel_list_item (this, f11_'|) LPAD (a.DATA_ID, 4, '0'). ") » ',
    7. '' YES. ''
    8. '',
    9. -Select Group «-»,
    10. "f10_" | LPAD (a.DATA_ID, 4, '0'),
    11. NULL,
    12. 'NO '.
    13. ) WAVE_GROUP,.
    14. apex_item.select_list_from_query ("11, b.") WAVE_USER,"
    15. "SELECT user name d.
    16. |' username r FROM dwd_user where group = ' | b."WAVE_GROUP."
    17. '',
    18. '' YES. ''
    19. '',
    20. "- Select user -",
    21. "f11_" | LPAD (a.DATA_ID, 4, '0'),
    22. NULL,
    23. 'NO '.
    24. ) WAVE_USER
    25. of 'DWD_WAVE_MASTER' a, b dwd_wave_assignment
    26. where a.data_id = b.data_id
    27. and b.wave_id = 'wave_1. '

    If I exclude the condition 2nd selection list query and change as below then everything works fine. Query does not give error on sql developer.

    Use: APEX 4.2.6 with Database 11g.

    1. apex_item.select_list_from_query ("11, b.") WAVE_USER,"
    2. "SELECT user name d.
    3. |' username r FROM dwd_user ",
    4. '',
    5. '' YES. ''
    6. '',
    7. "- Select user -",
    8. "f11_" | LPAD (a.DATA_ID, 4, '0'),
    9. NULL,
    10. 'NO '.
    11. )

    What is the data type of DWD_WAVE_ASSIGNMENT. WAVE_GROUP? If it is not a number, then it must be enclosed in quotes when it is used as a literal:

    apex_item.select_list_from_query(11, b."WAVE_USER",
    'SELECT username d, '
    
    ||'username r FROM dwd_user where groups = ' || dbms_assert.enquote_literal(b."WAVE_GROUP"),  
    
    '',
    'YES',
    '',
    '- Select User -',
    'f11_' || LPAD (a.DATA_ID, 4, '0'),
    NULL,
    'NO'
    )
    
  • contains the clause in the search for interactive report of a clob column

    Hello

    I use the Version APEX 4.2.4.00.08

    How to use an interactive report contains the when searching a clob column so that it uses the CONTEXT index?

    Thank you

    Chandra.

    I wrote it in the SQL used for IR

    I created an APEX application that stores all our it's the HOWTO documents. (word, excel, pdf)

    ctx_doc.snippet creates the HTML code.

    select D.doc_id
      ,D.doc_filename
      ,dbms_lob.getLength( D.doc_blob ) as download
      ,decode( :P12_SEARCH, null, '-- nothing --',
             ctx_doc.snippet( 'IT_DATA.DOC_CTX_IX' -- my Oracle Text index name
                                 , D.doc_id, :P12_SEARCH )
       )
       as snippet
    from it_data.documents D
    where :P12_SEARCH is null
    or contains( D.doc_blob, :P12_SEARCH ) > 0
    

    MK

  • Is possible to save the user who uses the download action in an interactive report.

    Hello

    In my application I want to save that downloads information from the interactive reports in any format, is this possible?

    Concerning

    Hi Eva,

    The event would be onClick of one of the download buttons (either CSV, HTML, PDF). Al of these download buttons have an id that starts with 'apexir_dl_' but including the suffix of ASD file extention (so the Download CSV link would be "apexir_dl_CSV").

    The PL/SQL procedure for the actual record is accurately described in the link Tony posted.

    Kind regards

    Vincent

  • Formula for Interactive report calculation field - Total amount per order

    Hello

    I use interactive report of the Apex 3.0 as a customer and want to build a formula for the scenario below.
    This is the more difficult scenario to date.

    There are three fields: 'NO ORDER', 'TYPE of PRODUCT","AMOUNT ".
    For example,.

    'NO ORDER' / 'PRODUCT TYPE' / 'AMOUNT '.

    101 / license / 10000
    101 / license / 5000
    101 / support / 2000
    101 / support / 1000

    102 / License / 5000
    102 / License / 2000
    102 / support / 1000
    102 / support / 500

    I want to add two fields 'Total license' and 'Total support' calculation by command.
    The result should be as follows:

    'NO ORDER' / 'PRODUCT TYPE' / 'AMOUNT' / 'Licence Total' / 'Total support '.

    101 / license / 10000 / 15000 / 3000
    101 / license / 5000 / 15000 / 3000
    101 / support / 2000 / 15000 / 3000
    101 / support / 1000 / 15000 / 3000

    102 / License / 5000 / 7000 / 1500
    102 / License / 2000 / 7000 / 1500
    102 / support / 1000 / 7000 / 1500
    102 / support / 500 / 7000 / 1500

    Would appreciate your help.

    Thank you
    Guy

    You can use the fields of IR calculation for a single record. So you can not "anticipate" or sum over an order or product_type.
    You have to solve in your query IR itself.
    You can get (something like) that with:

    select order_no
    , product_type
    , amount
    , (select sum(amount) from test2 b where a.product_type = b.product_type and a.order_no = b.order_no) total
    from test2 a 
    

    Or more elegant and better performance wise with analytical functions:

    select order_no
    , product_type
    , amount
    , sum(amount) over (partition by order_no,product_type) total
    from test2 a 
    

Maybe you are looking for

  • How to remove blackberry plist files?

    Hello everyone, I have met some problems during the uninstallation of some old girlfriends of macbook pro's blackberry apps (10.7.5). She did run the original uninstaller, but he left behind some files and processes (that I was responsible for withdr

  • Tutorial Web

    In my HP Mini 210-2072CL, if I go into Windows, click on start, go to all programs, then on HP Quick Web, and then the tool configuration fast Web, one of the options shown is a tutorial of QuickWeb.  If I try to open that, Splashtop stands up and sa

  • Error on Windows Vista blue screen about crash of hard disk after every 10-15 minutes.

    My system crashes after every 15 minutes showing this blue screen error. Since a few days before this error, hard drive, reading ability has been slowed a lot. When opening a disk or a file, it takes a lot of time compared to the normal fulfilment. A

  • Microsoft Lifecam has stopped working

    So I bought myself a new Lifecam yesterday, and it worked very well, no drama at all. However, this morning when I booted the computer, I ran an update to it, and it has not worked since. It may work on messenger and Skype, but whenever I try to open

  • 'Limited' network connectivity

    I put my two PC (a Vista and XP) together via a single network (without router or internet) cable network. Then I turned on all the Vista network settings and disabled/removed all password-protected sharing and all available to anyone, since there wa