Interactive report run pl/sql by clicking on link column

Hi!
How can I run pl/sql script by clicking on a link column of an interactive report?
Andras

EDIT : Oh sorry don't saw the date, I'm a little late...
Hi,
if you want a link for each row, an other solution is to include the link column in your query, which would be more customizable, ie :
select
COLUMN1,
COLUMN2,     
'<ahref="f?p=&APP_ID.:6:&APP_SESSION.::NO::" onclick="your_function('||YOUR_ID_COLUMN||');return false;">link or picture</a>' as "link",
COLUMN3;
from
...As you see, you will have to include the ID (primary key) column to your report ("hidden") to identify the row clicked when calling your function.
If you want to use the Link Column property in the report attributes, you will have to call you js function in the "URL" field like that :
javascript:your_function('#YOUR_ID_COLUMN#');
Yann.
Edited by: Yann39 on 17 sept. 2010 02:41

Similar Messages

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Interactive report from PL/SQL function

    Hello All,
    i have a pl/sql function that dynamically builds up a sql query and returns it as a varchar2.
    when i create a new report then i can use this function in the report like
    return f_function(param1,param2,v('APP_ID'), v('APP_SESSION'));
    and this works fine.
    Except i cannot create an interactive report for this function, because it is not allowed !!!!
    So how can i use the function in an interactive report ?
    Thanks in advance,
    Marco

    Marco,
    Another rather extreme approach would be to go all the way and make your function pipelined (that is not only build but also execute the query) and then select from it in your interactive report.
    The disadvantage here would be that any supplementary filtering would act on the result set of the function (not as an addition to the where clause of the original query). But if you can live with that...
    The advantage would be that there's less fiddling with column headers.
    Regards,
    Iulian

  • Interactive Reports and PL/SQL Functions

    Hi,
    Am new to the interactive reports, and it appears to be I can only use a single SELECT statement to populate the report.
    I need to convert some older reports to the new interactive reports, but these are populated using PL/SQL functions, as the WHERE clause is built up depending on the selection of items on the web page.
    How can I replicate this with the new interactive reports? Have used CASE statements within a SELECT statement before, can I also use these in a WHERE clause as well?
    Regards
    Simon

    To my knowledge, currently the only way to use Interactive Reports is on a static query. And unfortunately you can't use CASE statements in the WHERE clause of a query, only in the select list.
    The way I would (and have) attacked this is to:
    1. Write the base static query as the basis of the interactive report
    2. Access the interactive report in while logged in as a developer
    3. Build a filter (or set of filters) and save the report. You have the choice of saving it as a named report or as the default report.
    This gives the user one to many filter sets they can use as a starting point and tweak, and gives them examples as to how they can and should use the interactive filtering.
    Doug

  • Interactive Report with multiple SQL

    I have an Interactive report that currently show info from 1 query. I want to be able to include info from another query on the report (like a master detail).
    I see it mentioned on the New features that it can now support multiple SQL's. How do you do it?

    Bob,
    Interactive Reports only support 1 query. You can write your query to pull data from multiple tables but only have one query. The new feature you are recalling is the 'Report Queries' now support multiple queries. Report Queries are under Shared Components and are used for custom pdf, excel, etc. printing - different feature.
    -- Sharon

  • Interactive report - Function returning SQL query

    i notice that it is not possible to create an interactive report based on a function call. can anyone shed any light on why this is?
    also, is there a work around possible? i really dont want to store my SQL query inside a page in the application

    Craig,
    I tried the collection workaround as well but noticed that it gets incredible slow when data sets grow bigger. Depending on what you need maybe my solution is of help for you:
    I used multiple subpages with interactive reports, an iframe and a javascript function setting the iframe-src on the main page, see my last post on
    interactive report custom GO-Button (-process)
    Paul

  • Set report radio group row selector when a link column is clicked.

    Hi can anyone help?
    I have a sql report with a radio group record selector on the left, this is used on click to populate some extra fields on the page. I also have a link column on the right of the report that is used to display another popup page. What I want is to synchronize the radio group selector when the link is clicked (that is select and click the radio group of the current row when the link column is selected).
    Page layout
    rg1 row details link pen icon
    rg2 row details link pen icon
    rg3 row details link pen icon
    extra field 1
    extra field 2
    Report attributes - link column URL.
    JAVASCRIPT: modalWin2('f?p=&APP_ID.:#SHOW#:&SESSION.::::SAVE_STATUS:N');
    I’m assuming I can call another javascript function from the link URL above and somehow I get the number of the row of the link selected . I think if I can get that I can use the code below where n is the row number of the link selected.
    Javascript :-
    var l_check = $x_FormItems($x('EVENT_HIST1'), 'radio');
    l_check[n].checked=true;
    var l_click = l_check[n].click();
    Thanks Pete

    Pete:
    One way to solve your requirement is as below
    Change the report query to be something similar to
    select
    apex_item.radiogroup(40,empno,null,null,'id=rg_'||rownum) rad,
    ename,
    '<a href=javascript:fx('|| empno ||',' || '"rg_'|| rownum ||'")><img src="#WORKSPACE_IMAGES#delete.gif"></a>' link_column
    from empAnd the JS function fx as function fx(emp,rgId) {
    $x(rgId).checked=true;     // checks radio on this row
    modalWin2('f?p=&APP_ID.:' + emp + ':&SESSION.::::SAVE_STATUS:N'); // popup page call
    }varad

  • Run bash command on clicking irc:// links

    I want a certain program to open IRC rooms and servers linked in pages. However the program in question needs flags to interpret the links supplied, so just choosing the executable binary for the client is not enough.

    Yes, don't fast double click a link that isn't meant to be double clicked.
    See www.grainge.org for RoboHelp and Authoring tips

  • Interactive Reporting and Custom SQL

    I have SQL that works in TOAD and I'd like to copy it directly into IR; however, it appears that the custom SQL feature only allows you to "customize" the FROM, WHERE, etc parts of the SELECT statement and not the database fields that are directly after the SELECT. For example, the code below works in TOAD:
    SELECT cr_type,
    LPAD(SUBSTR(CR_NUM,1,5),5) CR,
    TITLE,
    nvl(sum(decode(a.employee_Id,1234,hours)),0) DL,
    nvl(sum(decode(a.employee_Id,5678,hours)),0) MF,
    nvl(sum(decode(a.employee_Id,9101,hours)),0) HM, etc
    I am having a hard time re-creating this code in IR. I finally did manage to come close to what TOAD gives me; however, is there an easier way to use the custom SQL to just cut and paste the entire SQL statement that works in TOAD and put it into IR?
    Thanks.
    Terri T.

    You can Import the complete SQL String into IR, but you will not be able to modify it once it is in IR.
    You can create Computed Items in the Request Line for each of the SQL segments, i know it is labor some but it works. Just make sure that the Data Type is as you want it - Options Tab.
    Another Option is to have the SQL String you have turned into a view on the database and query it that way.
    Wayne Van Sluys
    TopDown Consulting

  • Paramerterized Interactive Reports - is there a quick solution to stop the query from executing when entering the page prior to user clicking go.

    Example
    Currently, when the user enters the page the interactive report runs (without the user hitting "go")and - indicates no data found because one of the "parameterized" fields is required and the sql is not setup for nulls.
    I'm Looking for a way to not perform a query  at all -------until the user hits go for the first time on the page - then each time they re-enter the page in the same session it would be ok to auto submit the query.
    I believe I can setup a hidden item and check on my interactive report E1 not null.  Then create a "computation" on "after submission" that would set this value to a value - say 1.
    I can seem to be able to get this to work however.
    In my interactive report - I'm wondering what "condition type" should I be using.  Any thoughts would be greatly appreciated.

    In this case I just have 2 parameters.  The goal is to allow the user to "pre filter" BEFORE rendering the interactive due to the possible size of the report.  This pre fliter could be by say- order type or region or branch etc.
    Right now, I believe its all one region - see below.
    My first attempt, I put a branch on the after submit on the go button and then put a condition on the interactive report.  This worked but caused a looping issue when trying to select a column on the interactive report itself.  My guess is , because that drop down was also using that same go button.
    Anyway, please advise how to best  "pre filter" prior to rendering an interactive report.  Should I have two seperate regions or can I use one region.  Any assistance would be greatly appreciated. 
    Order Parameters 2 
    Before Header 
    Branches
    Computations
    Processes
    After Header 
    Computations
    Processes
    Regions
    Before Regions 
    Computations
    Processes
    Regions 
    Body (3) 
    Search 
    Items 
    P6_TEXT
    P6_ITEM_NUMBER
    Region Buttons  P6_GO
    Order Type &P6_TEXT 
    Report Columns 
    Order Type
    Operating Unit
    Order Number
    Line Number
    Item Number
    Invoice Week
    Items 
    P6_NAME
    P6_ITEM_NUMBER_ALT
    Position 01  Breadcrumbs
    After Regions 
    Computations
    Processes

  • How to customize an interactive report PDF using a BI Publisher template

    Hi,
    I am trying to figure out how to get an interactive report to work with BI Publisher. I want it so that I can create a custom RTF template with custom headings, and then apply this for the interactive report.
    On the front end, when a user runs an interactive report, they are able to hide and show columns, and then click on Actions > Download > PDF. I want this to access the custom template and return a PDF based on this template, and also showing the columns that the user has selected in the interactive report.
    I have already created a custom RTF Word Doc in BI Publisher, and have uploaded it into a report query created in Apex. I am not sure though how to apply this report query to an interactive report, or if that’s even what I’m supposed to do to get it to work the way I want it to.
    When editing the Report Attributes, under Print Attributes, there is a section called Printing.
    Under this, there is a "Print Server Overwrite". I thought this is where you can specify your report query. But I am not sure if I even need a report query because I don't understand why you have a report query that is based on a static query, when in an Interactive Report, the user can hide columns.
    I have Apex 4.0.1.00.03 and Oracle BI Publisher 10.1.3.4.0d installed.
    Thanks,
    Gage

    Hi Gage,
    Custom RTF and XSL-FO templates are currently only supported with classic report regions and report queries, but not with interactive reports. So you would need to create a report query based on the SQL statement you used for your interactive report and then associated your template with that report query. Unfortunately you won't be able to use any of your customizations, filters, or column selections this way. We're planing to support report layouts with interactive reports in the future.
    Regards,
    Marc

  • Public / Sharing of Interactive Reports

    The new Interactive Reports are a great feature that will be extremely helpful for both our development team and our users. However, currently when a user saves an interactive report, there's no way to share it with other users or to make it a public report that can be viewed by everyone. This is because the report is saved with the user's name and can only be viewed by that particular user. This really limits the usefulness of the interactive reports. For example, we would like to enable our power users, administrative users, and even regular end users to be able to create and modify reports and share them with others. In addition, our company has several hundred Crystal reports that we would like to replace with interactive reports. However, if our development team creates all of these as interactive reports (using the “Save Report” feature, not as separate pages), there is no way to make them public so that all of our users can then access them. I've read several requests in this forum for this type of enhancement. I've also read that the apex team intends to implement this sharing feature soon. In the meantime, I've figured out a work-around. This work-around saves and retrieves all interactive reports using a generic, fictitious user name. Using the Page Sentry Function under the Authentication Scheme, we switch the APP_USER to a generic, fictitious user only for the interactive report pages, and set APP_USER back to the original, correct user on the other pages. Here's the code I'm using in the Page Sentry function:
    declare
    c owa_cookie.cookie;
    begin
    if :app_page_id in (1,51,52) then
    APEX_CUSTOM_AUTH.SET_USER('REPORT_USER');
    else
    c := owa_cookie.get('LOGIN_USERNAME_COOKIE');
    APEX_CUSTOM_AUTH.SET_USER(c.vals(1));
    end if;
    return true;
    end;
    This code will set the APP_USER to "REPORT_USER" on pages 1, 51, and 52. Therefore, when interactive reports are saved or retrieved on these pages, they will use the user named "REPORT_USER" regardless of the user that actually logged into the application. This concept can also be expanded to limit certain reports to certain users (or groups of users) by calling a custom function in the database.
    I tried using the SET_USER code within a page process (PL/SQL anonymous block), and although it changed the APP_USER, it did not affect the interactive report. I assume this is because the interactive report “does its thing” prior to the firing of the processes on a page. However, the Page Sentry function apparently fires earlier in the sequence (before the interactive report processing).
    This will make the interactive reports much more useful for our company and I hope it will be useful to some of you as well.
    Darrin

    Scott-
    Thanks for the feedback. I tried both the Session Verification Function and the VPD attribute and neither one accomplished the goal. The VPD attribute PL/SQL code apparently fires too late in the process, so although it changed the APP_USER, it had no affect on the interactive report. And the Session Verification Function had adverse affects on the authentication. So rather than mess around with the security settings in the application, I came up with a different work-around.
    Here's the new work-around.
    On the interactive report page I created a page process (PL/SQL anonymous block) and set the process point to "On Load - Before Header". For the process I entered the following pl/sql code:
    begin
    update FLOWS_030100.WWV_FLOW_WORKSHEET_RPTS
    set APPLICATION_USER = :APP_USER
    where ID = :REPORTID
    and session_id is null;
    end;
    This code changes the application user in the underlying interactive report table. It sets the user to the current APP_USER only for the report being viewed. Therefore, when the interactive report processing happens, it thinks the report is for the current APP_USER and renders the report just fine. It also saves any changes to the report back to the base report so other users can view the modifications as well.
    I have the tab feature turned off on my interactive reports. Instead I have another page that lists all the interactive reports. When a user clicks one of the reports in the list, I set the REPORTID variable and pull up the corresponding interactive report (that's why I'm using REPORTID in the where clause). For users that are using a tabbed approach, they may have to set the application user for all of the base reports (or figure out another way to determine which individual report tab is being viewed). If they were setting it for all the base reports, it would look like this:
    begin
    update FLOWS_030100.WWV_FLOW_WORKSHEET_RPTS
    set APPLICATION_USER = :APP_USER
    where session_id is null;
    end;
    This solution isn't ideal when lots of users are hitting the same interactive report. It's possible that if two user attempt to load the same interactive report at the same time, the following might happen.
    1. User A triggers process to update underlying table
    2. User B triggers process to update underlying table
    3. User A triggers process to run interactive report (and therefore does not see the report because the report is now set to User B)
    4. User B triggers process to run interactive report (and sees report just fine)
    So the solution isn't ideal, but it's the best I could come up with until the apex team implements real report sharing. I've tested it with a handful of users and it's worked very well so far.
    Darrin

  • Interactive Reports and LoV

    2 related problems to this community:
    1) I converted a classic report to an interactive report. Now the columns that were 'Display as LoV' have become 'Standard Report Columns'. In the drop down for the report attribute, one does not see 'Display as LoV' any more. So how to implement this in an Interactive Report?
    2) I can still display the column by specifying a select query in SQL for the LOV under report attribute. But how can the SQL query refer to a static LoV defined in my application. Specifically how will the select look (if it is at all possible to reference a static LOV in SQL).

    Hi,
    Firstly, try running the following SQL:
    SELECT * FROM APEX_APPLICATION_LOV_ENTRIESthis gives details of the static LOV entries.
    Secondly, the "List of values" settings on an Interactive Report are to define the list of available values when the user clicks on a column header to apply a filter.
    Therefore, you would need to join the original SQL statement to something using the above SQL View to return the actual value represented by the key.
    Andy

  • Uploading an image in interactive report APEX 4.0

    Hi,
    I hope you can help me. I am using the book "Begining ORACLE APEX", which is for APEX 3.1.2, to learn APEX. Now, I use the online APEX 4.0. In the 6th chapter one should add new columns to the PRODUCTS table: one for the PRODUCT_IMAGE, a BLOB column, and 3 more for MIMETYPE, FILENAME, and IMAGE_LAST_UPDATE. So, i need to make an interactive report, with this new table. I include it, but when I run the application it doesn't show. So i insert in the SQL for the report : "PRODUCT_IMAGE", and run the page again, and there i add the column using Actions button. When added, each row is is filled with: [unsupported data type]. When trying to upload an image it doesn't work. It doesn't show anything. I even tried putting: dbms_lob.length("PRODUCT_IMAGE") "PRODUCT_IMAGE" in the SQL of the report, but it doesn't work. It is like a problem with uploading the image. It doesn't do anything.
    I would really appreciate your help, this is really important for my job..
    Sincerely,
    Leila

    See the sample application provided in your workspace, there in page no 3 they have created a interactive report showing a image in one of the column, I think it will solve your problem.
    Tauceef

  • Set Form Values From Interactive Report Row

    Using Apex 4.2.
    I have two tables: T1 and T2
    Table T1 contains five columns: CT11, CT12, CT13, CT14, CT15
    Table T2 contains 4 columns: CT21, CT22, CT23, CT24
    I have a page with two regions. Region 1 is a Form on a Table using table T1. Region 2 is an Interactive Report ( IR ) on table T2.
    The SQL for region 2 is:   select apex_item.RADIOGROUP(p_idx => 1, p_value => CT21) "Choose", CT22, CT23, CT24 from T2;
    When the user clicks a radio button for a row in the Interactive Report, I would like the values in the IR cells CT22, CT23, CT24 to populate the CT13, CT14, CT15 fields in the table form in region 1. If a user clicks another row radio button, the values should update.
    Any help is greatly appreciated.  Thanks!

    Hi,
    As per my understanding ur requirement is as below.
    When the user clicks the 'Link Column' it should redirect to another page with the value of id, Day, Start Time, and End Time.
    Hope all the cloumns are from the same table.
    As Denes said, it is enought to pass the ID value to the link column as of below.
    ie., u can modify ur query as of below.
    SELECT Last Name,First Name,Day,Start Time,End Time, ID as "Link Column"
    FROM t.
    Now u can pass the value  as #Link Column# which will pass the ID value to the next page.
    Hope my understanding is correct.

Maybe you are looking for

  • BO 4.0 webi: Conditional formatting on a bar graph

    Hi, Is it possible to fiormat a Bar graph conditionally in BO 4.0(SAP BO BI: web intelligence).. I want to create a bar graph that displays bar in Green color if the value of bar is greater than target set and Red if it is less than target, which is

  • Pse 7 organizer crashes when outputting slide show

    PSE 7 closes down with the message that organizer has encountered a problem when I try to output a slide show in any form - create wmv, send to Premier Elements, write cd/dvd - a part of the file is actually output since I am able to go in and find i

  • Is there a way to search the app store by OS?

    My daughter still has an ipod touch 2g and with all the versions of operating software out now it is harder to find apps that will still work on her device without looking at details for every app. I would love a way to search by OS.  I do keep her s

  • Any way to not print certain fields?

    Using acrobat Xi pro I'm creating a form with multiple fill in text boxes and drop down boxes. I'm trying to figure out a way to have the form not print the unused / unfilled boxes.  I've tinkered with the show/hide and it's not working and my knowle

  • Bricked Iphone 3G after 2.1 -- 2.2 upgrade

    Hi all, I'm quite desperate, after upgrade of my (previously perfectly wroking) Iphone 3g to the new 2.2 sw version I'm having a 2.2 Ibrick 3G!! It only show the page where is display to connect to iTunes by Usb cable and "slide for emergency". When