Display a conditional link in interactive report

Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
This is the sql code.
Select
(case
   when mytable.myvalue is not null then ('<a'||' href="'||'f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value||'">'||'<img src="#IMAGE_PREFIX#menu/download_32.gif">
</a>')
   else null
end) link
from
mytableI also tried apex_uil.prepare_url.
Select
(case
   when mytable.myvalue is not null then ('<a'||' href="'||apex_util.prepare_url('f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value)||'"><img src="#IMAGE_PREFIX#menu/download_32.gif">
</a>')
   else null
end) link
from
mytableAlthough it seems that is correct, instead of displaying the link, the report displays the html text of the link
(I omitted the first *<* and the last *>* to display the text in the thread):
value displayed a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></aI did a lot of researchs of implemented solutions, but to me always return the same result.
I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.
thanks
greetings
Edited by: diapason on Sep 8, 2011 9:09 AM
Edited by: diapason on Sep 8, 2011 9:19 AM
Edited by: diapason on Sep 8, 2011 9:33 AM

>
Welcome to the forum.
Please read the FAQ and forum sticky threads (if you haven't done so already).
Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
This is the sql code.
Ah. It looks like you've now found the instructions on how to post code...
Although it seems that is correct, instead of displaying the link, the report displays the html text of the link:
value displayed
<a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></a>I did a lot of researchs of implemented solutions, but to me always return the same result.
I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.Ensure the Display Text As report column attribute is Standard Report Column rather than the default Display as Text (escape special characters).

Similar Messages

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

  • Display image for BLOB  Download link in Interactive Report

    I have a table containing BLOB data and am displaying the table in an interactive report. I would like to replace the "Download" text link with an icon that represents the MIME type of the BLOB, but can't seem to find a way to make the substitution. Does anyone know how to do this? Thanks.
    -Jeff

    Hey Ben,
    Thanks for the suggestion. I understand what you are saying, the problem is that when you have an interactive report that includes a BLOB and you use the built-in method for displaying a download link, it only gives you the option of using a text link. The method is outlined in the online help under:
    Home > Advanced Programming Techniques> About BLOB Support in Forms and Reports > About BLOB Support in Reports
    This is done by using the following syntax in the Number/Date Format of the column attribute of the BLOB:
    DOWNLOAD:CC_DOCUMENTS:CONTENTS:ID::MIME_TYPE:FILENAME:UPDATED_ON::attachment:View
    Where the last parameter is the link text. The only problem is that there is no option for substituting an image rather than the link text. That's what I'm trying to work around. Sorry if you new all of this already, but I wanted to explain what I've already done. Thanks for any help you can offer.

  • Hide logout link in interactive report

    Hi,
    Can anyone tell how to hide logout link in interactive report?
    Thanks,

    Hi,
    Sorry, I do not understand question.
    How you did get logout link to interactive report ?
    I have never seen that logout link is generated to report automatically.
    But id you go
    Home>Application Builder>Application xxx>Shared Components>Navigation Bar Entries
    and edit your logout link, you can set condition witch page you like it to be displayed or not to be.
    I think you mean that one
    Br, Jari

  • Substitution for DB link in Interactive report

    Hi,
    Is it possible to use substitution strings for DB link in Interactive report in same way like it works in Classic reports (by choosing Generic column) or in any other way.
    Currently when i'm trying to put SQL like :
    select empno, empname from emp@&DB_LINK.
    I receiving the error •Query cannot be parsed, please check the syntax of your query. (ORA-02019: connection description for remote database not found)
    APEX 4.1, Oracle 11.2

    It is possible. We have an application that uses the same code set (pages) where the user can select which target instance will be used at run time.
    The trick is that the DB link substitution variable must contain the "@" character. So your query looks like:
    select ...
    from my_table&TARGET.
    where...
    &TARGET. must be something like "@my_database" .
    At compile time, &TARGET. will be null, and the table name can be resolved, if there really is a table, my_table in your parsing schema, or a vaild synonym.
    You can have a synonym available at "compile" time, when you save the page source. For example, the synonym my_table equates to my_table@your_database, which has to exist.
    There several other things that must be done, but this should get you started.

  • Control break on column displayed as link in Interactive Report

    Hi,
    If someone can help me, i'd greatly appreciate it!
    I created an interactive report - one of the columns has a link attached to url specified in the Report Attributes/ link section.
    When I use the control break feature in the gear icon, the report seems to be grouped by the url/link and not by the actual column value.
    When I remove the link from the column - all is fine and the break does work.
    This column must get displayed as a link. Is there any workaround for this problem?
    Thanks,
    Hindy
    Edited by: hindyp on Dec 2, 2009 7:33 AM

    Hi,
    I don't know the details of the procedure, but you would have something like:
    CREATE OR REPLACE PROCEDURE "print_model_change"
      v_acctnum NUMBER,
      v_model VARCHAR2,
      v_rrcode NUMBER
    AS
    BEGIN
      .. DO SOMETHING WITH v_acctnum, v_model, v_rrcode
    END;This needs to be updated to something like:
    CREATE OR REPLACE PROCEDURE "print_model_change"
      v_manager_model NUMBER
    AS
    BEGIN
      DECLARE
        v_acctnum NUMBER;
        v_model VARCHAR2;
        v_rrcode NUMBER;
      BEGIN
        SELECT ACCTNUM, MODEL, RRCODE
        INTO v_acctnum, v_model, v_rrcode
        FROM .. your report's FROM statement plus ..
        WHERE MANAGER_MODEL = v_manager_model;
        .. DO SOMETHING WITH v_acctnum, v_model, v_rrcode
      END;
    END;and followed by:
    GRANT EXECUTE ON "print_model_change" TO PUBLICto make it available
    The existing code receives all the data it would need (presumably). The updated code receives the manager_model value and, using the same FROM clause that you have for your report PLUS a WHERE clause (or, if you are using a WHERE clause in your report, change this to AND), finds the data that it needs for v_acctnum etc. After it has that data, the rest of the existing code can be used unchanged.
    Andy

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link).
    I am running Application Express 4.0.2.00.07 on Oracle 11gR1.
    Any help would be great.

    Hi VANJ,
    Sorry for the poorly written original post. I will be much more specific.
    I have a Interactive Report on page 40. That report has a column named X_UID that is a link back to page 40 and sets a text item named P40_X_UID in a Region we will call "Form X" with the value of the column. That page refresh also then calls a Automated Row Fetch process to fetch all the values needed for the rest of the page items in the "Form X" region. Also "Form X" region has a conditional display on to only display when P40_X_UID is not null.
    What I would like to do:
    When the user clicks on link in the IR for X_UID instead of the "Form X" region becoming visible I would like to become modal. I am trying to use a Plug-In named "ClariFit Simple Modal - Show". I have it working with a Dynamic Action when you click a Page Item. But I would like to to work when the link is clicked and the data populated.
    I hope that helps some.

  • What is best way to link two interactive reports?

    Hi,
    =================
    Basic Set UP
    =================
    I've created two interactive reports-- Project report in Project page and Task report in Task page.
    Project report in Project page can contain multiple projects.
    Task report in Task page can contain multiple tasks.
    One project can have multiple tasks.
    But one task can have only one project.
    =================
    What I'm trying to achieve
    =================
    When I click a Project Name, it should pass Project ID to Task page and display tasks that are pertaining to the project.
    When I create a new task, the passed Project ID should be mapped to the task.
    =================
    Challenges
    =================
    1. How can I pass Project ID from Project page to Task page while clicking Project Name in Project page ?
    2. How can I get Project Name in Task page based on the Project ID passed from Project page ?
    3. How can I display tasks pertaining to the Project Name ?
    4. How can I take Project ID passed to Task page and map it to a new task?
    Thanks,
    Guy

    1. How can I pass Project ID from Project page to Task page while clicking Project Name in Project page ?Create hidden item in Task Page, for example :P2_PROJECT_ID. Than link on required column to Task page:
    Interactive Report -> Edit Column -> Link.
    2. How can I get Project Name in Task page based on the Project ID passed from Project page ? There is two ways you can create a function that will return project name by id or you can post project name to task page (The second way is unsafe, you can miss some parts of your project name if you will have a ',' symbol)
    3. How can I display tasks pertaining to the Project Name ?In interactive report source add condition to your query, for example:
    and task_table.project_id=:P2_PROJECT_ID

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • Column link in interactive report to run procedure and refresh

    I have an interactive report which displays a report based on a table. This is a summary table populated overnight from some complex spatial analysis, which takes a few hours to run. I have a requirement to allow the user to refresh one row in this table - they would do this during the day if they needed to see the most up-to-date values.
    I have a package with two stored procedures - one which does the full refresh of the table, and one which refreshes one row when PK is passed in.
    One of the columns in the table is 'last_refreshed' which is a date - this is shown in the interactive report including minutes.
    I was thinking that maybe I could include a hyperlink on this 'last_refreshed' date column in the report. When a user clicked on it, it would run the stored procedure for that row and would refresh the report.
    Any ideas on how I could do this? I've hit a bit of a dead end for now.
    Thanks

    OK, I worked it out.
    I created an application item to store a global variable.
    Then in the column attributes of the report, I set the 'last_refreshed' to be a linked column, setting target to the current page and then setting the application item global variable to be the row PK.
    Then I have a Process which runs the required stored procedure reading the application item global variable, set to run on page load.
    Sorted.

  • How to send a conditional email with interactive report subscription

    Hi,
    i have an interactive report with subscription.
    I would like to send an email with the attachment only when the query returns one or more records.
    How to to this?
    Apex 4.0.2
    Thanks in advance
    lukx

    Well, to understand your requirements can I ask this:
    You said earlier you want a report sent whenever records that meet a criteria exist, correct? So you want the application to query for a condition, and when that condition occurs (a row with primary Key = X, a select COUNT(1) for rows with column X returns a result of 1 or more)
    Then you would schedule a batch job:
    BEGIN
    -- Job defined entirely by the CREATE JOB procedure.
    DBMS_SCHEDULER.create_job (
    job_name => 'Send_Email_Procedure',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN Test_For_COND_SEND(); END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'freq=hourly; byminute=0',
    end_date => NULL,
    enabled => TRUE,
    comments => 'Job defined entirely by the CREATE JOB procedure.');
    END;
    This would in theory run hourly and run your test_for_cond_Send process, in which you would test for the condition and send an e-mail if it was found that would contain the results from your query/report.
    Here is a link to generate a PDF report that could be sent via e-mail: Re: how to save pdf in APEX 3.0
    Thank you,
    Tony Miller
    Webster, TX
    While it is true that technology waits for no man; stupidity will always stop to take on new passengers.

  • Link to interactive report with filter values containing : or %

    Hi,
    I have an application written in PL/SQL. The application takes input from users, and then constructs a URL for an interactive report, concatenating the user input as filter values for the report. Sometimes, the input values contain characters such as the colon (:) or the percent sign (%). In these instances, APEX appears to ignore the rest of the URL beyond the first colon or percent sign in the filter values. For example, in the following URL, the first filter value is "Oracle Database 11g: Workshop I":
    http://abc.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_TITLE,IR_PROJECT_STATUS:Oracle Database 11g: Workshop I,Completed
    The Interactive Report displayed for this URL shows all courses whose title contains "Oracle Database 11g" -- in other words, more records are displayed than should have been if the complete set of filters were applied in the query (i.e., TITLE = Oracle Database 11g: Workshop I, and PROJECTS_STATUS = Completed).
    How should I construct the URL so that the colons (:) and percent signs (%) which may be part of the filter values are treated correctly?
    Thanks,
    Jenny

    Thanks to Joel Kallman, here's the answer:
    The ‘f’ procedure has a parameter named p_sep. This is the separator used for the arguments in the ‘p’ parameter in the call to the ‘f’ procedure. The default value for this separator is ‘:’, obviously.
    If you have data values that contain the separator, then you can use a different character for your separator (you may need to manually specify the URL instead of using the declarative link attributes of a column in a report).
    Using the pipe symbol ‘|’, I was able to take:
    http://st-curr.us.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_ROWFILTER:Database 11g: Administration Workshop I
    and change it to:
    http://st-curr.us.oracle.com/pls/apex/f?p=129|8||||8,CIR|IRC_ROWFILTER|Database 11g: Administration Workshop I&p_sep=|
    which now works.

  • Link to interactive report

    i use the following link to point to a page (1) with a interactive report, but still all rows are shown and no filter is displayed:
    http://host:7000/pls/apex/f?p=104:1:3808170029937402::YES:1,RIR:IREQ_LOCATION:HSV
    whats wrong?
    here are the debug messages:
    0.00:
    0.00: S H O W: application="104" page="1" workspace="" request="" session="3808170029937402"
    0.00: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: de
    0.00: alter session set nls_language="GERMAN"
    0.00: alter session set nls_territory="GERMANY"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...NLS: Set Decimal separator=","
    0.00: ...NLS: Set NLS Group separator="."
    0.00: ...NLS: Set date format="DD.MM.RR"
    0.00: ...Setting session time_zone to +02:00
    0.00: NLS: Language=de
    0.00: Application 104, Authentication: CUSTOM2, Page Template: 1358427100808202
    0.00: ...Session ID 3808170029937402 can be used
    0.00: ...Application session: 3808170029937402, user=UID01971
    0.00: ...Determine if user "UID01971" workspace "1341613165726624" can develop application "104" in workspace "1341613165726624"
    0.00: Session: Fetch session header information
    0.00: Saving g_arg_names=IREQ_LOCATION and g_arg_values=HSV
    0.00: ...Set Interactive Report Column filter for report column "LOCATION"
    0.00: using existing session report settings
    0.00: ...Metadata: Fetch page attributes for application 104, page 1
    0.00: Fetch session state from database
    0.01: Branch point: BEFORE_HEADER
    0.01: Fetch application meta data
    0.01: Clear cache: request=1
    0.01: ...Clearing Cache for Page 1
    0.01: Nulling cache for application "104" page: 1
    0.01: Clear cache: request=RIR
    0.01: ...Resetting Interactive Report
    0.01: using existing session report settings
    0.01: Saving g_arg_names=IREQ_LOCATION and g_arg_values=HSV
    0.01: ...Set Interactive Report Column filter for report column "LOCATION"
    0.01: creating session report settings as copy of default report settings
    0.01: Computation point: BEFORE_HEADER
    0.01: Processing point: BEFORE_HEADER
    0.02: Show page template header
    0.02: Computation point: AFTER_HEADER
    0.02: Processing point: AFTER_HEADER

    it was my mistake, i used the column name of the report instead the column name of the query, using:
    'f?p='|| :APP_ID ||':1:'|| :APP_SESSION ||'::NO:1,RIR:IREQ_SERVER_LOCATION:HSV'
    it works fine, but maybe someone can help me to have more than one "filter", how should the link look? i tryed:
    'f?p='|| :APP_ID ||':1:'|| :APP_SESSION ||'::NO:1,RIR:IREQ_SERVER_LOCATION:HSV:IREQ_SERVER_TYPE:ORA'
    but it doesnt accept the second filter
    thank you

  • How to pass ITEM:VALUE pair in ICON view link of Interactive Report

    When Icon View is enabled in an interactive report, you can display graphic images (blob data that are stored in the database) in 3 different views.
    1) View Icons
    2) View Report
    3) View Detail
    When you click on the displayed image in views 1 and 3 you navigate to a form to manage the row data and the image. By default it only passes the PK id of the row.
    How do I pass additional ITEM:VALUE pairs when navigating to the detail form page? I want to pass &APP_PAGE_ID. to the form page as well.
    There is an attribute under ICON VIEW called "Link Column" but if I put the "item:value" pair in the fields for this item's "ColumnLink" attributes, there is no effect.
    Also for bonus points...
    how do you make the ICON VIEW attributes, "HTML ALT Text" and "HTML TITLE Text" dynamic e.g. &ITEM. doesn't work here.
    thanks in advance
    Paul P

    For your link column, parse a link column in your query like so
    apex_util.prepare_url('f?p=M:53:'||:APP_SESSION||'::::P53_IMAGE_ID:'||i.image_id)Scott

  • Count the no. of clicks on a link of interactive report

    The interactive report query is as follows:
    SELECT COMP_CODE, TXN_CODE, TXN_NO, TXN_DT, DOC_TOTAL, 'PRINT' GET_PRINT
    FROM   TRANSACTIONI want how many times per page visit / session the link 'PRINT' is clicked. I want to display the no. of times the link is clicked.
    Sanjay

    Please don't re-post a question. You posted the same question back on 27 Sept 2010.. If you did NOT get any responses, maybe you should bump the prior question or modify that question to get some help..
    Thank you,
    Tony Miller
    Webster, TX
    I am a Ranger! We walk in the dark places no others will enter! We stand on the bridge and no one may pass! We live for the One, we die for the One!
    Anla-shok Credo from Babylon 5

Maybe you are looking for

  • FTP Adapter : Issue with Non English Text.

    Dear All, We are trying to read a file which contains Korean Language and write into a different folder in a CSV format. The output file contains "???" inplace of Korean text. We can see the invoke to FTP adapter contains Korean text as part of it's

  • My iphone dont show image artist

    hi please help me my iphone model 5s is dont show arist image in music player serial number : F1*****F9R IMEI/MEID : ***** Update : IOS 7.1.2 <EDITED by HOST>

  • Sharing with Latest iTunes

    Anyone else having problems sharing/playing playlists between two computers with the latest iTunes. I use to be able to see my laptop's and desktop's playlists. But now, for some unknown reason, the two computers can't "see" each other's playlists fr

  • PDF Virtual Printer Queue has doc print errors but PDF's created

    This has probably been answered already somewhere here, but I can't seem to find a current solution. I am using Windows 7 64bit Pro and Acrobat X Pro. When printing to a PDF from any source - word, excel, email, the PDF is created correctly, but my P

  • One of my stocks will have a reverse stock split tomorrow. how do it do that

    One of my stocks will have a reverse stock split tomorrow. How do I make this change on my portfolio in Firefox. The name of the stock is Citigroup Inc. Thank you Bob