0
votes

I am using Apex 20.1.0.00.13, trying to create link on a column of a Classic Report.

I have followed the step to create the link for a column and redirect it to a page in the same application as the steps below :

To create a link to another page, in the Link Builder - Target dialog: Type - Select Page in this Application. Page - Specify the target page number. Set Items - Select a Name and Value to specify session state for an item. Clear Session State, Clear Cache - Specify the page numbers on which to clear cache. To specify multiple page, enter a comma-delimited list of page numbers. Rest Pagination - Select Yes to reset pagination for this page.v Advanced, Request - Specify the request to be used. Click OK.

But when I am setting the item and values to specify session state for an item, the Set Items : Name doesn't populate the columns, it appears blank, Could someone let me know where I am going wrong.

I am trying to achieve a link from page 1 say a row with dept no - 2, to be directed to page 2 with details of dept 2 . Is there any other way to do it. Since its a column and not an item I am unable to pass it as a parameter to the next page.

Thanks in advance !

2

2 Answers

0
votes

Right; there are no "items" here, you have to create hyperlinks within the report.

Suppose that this is classic report's query:

with test (id, name) as
  (select 1, 'Google' from dual union all
   select 2, 'Yahoo'  from dual union all
   select 3, 'Bing'   from dual
  )
select 
  id, 
  '<a href="' || case 
                  when name = 'Google' then 'https://www.google.com'
                  when name = 'Yahoo'  then 'https://www.yahoo.com'
                  when name = 'Bing'   then 'https://www.bing.com'
                end
              || '" target="_blank">' || name || '</a>' as link
from test
order by name;

Go to LINK column's properties and set "Escape special characters" to "No". Run the report; everything should work OK.


If - as you say - use it to navigate to another page in your application and set some items to some values (from the IR), then you'd do something like this:

SELECT   
  'f?p=&APP_ID.:217'            || 
  ':&APP_SESSION.::NO::P217_ID' || 
  ':' || r.id
  as link, ... 
FROM my_table r ...

In other words: it navigates to page 217 and passes r.id column value into P217_ID item which is located on page 217.

link column from such a query can be referenced when creating a link column. It would be a

  • link to custom target
  • target type = URL
  • URL = #link# (literally, type #link#)
0
votes

Probably you could change and merge these two pages into one Master-Detail page. This way you could use the built in lookup function.