Solved

Oracle APEX 4 question

Posted on 2013-05-23
4
498 Views
Last Modified: 2013-05-31
I am new to Oracle APEX and have built what I think is a simple application.  I built an interactive report.  I have 4 parameters for the report, and I display the report in a region on the same page based on the query parameters. The report only displays two columns, an ID number (not unique), and a unique type.

Column1(IDCODE)       REP_TYPE
0987654321                  SAMPLE
0987654321                 ANOTHERSAMPLE

What I want to do is to set an item value to that of what is in Column1(IDCODE).  The reason I need to do that is so that I can then pass that item back to my database in a second query.
I hope this makes sense, I can elaborate further if necessary.
Thanks for any help you can give.
0
Comment
Question by:newtoperlpgm
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:ianmills2002
ID: 39193249
I assume you want to click on the value and kick off the second query?

Is this 2nd query used in a another report?
0
 

Author Comment

by:newtoperlpgm
ID: 39194571
Hello,
Something like that.  Yes, when I click on the link for that value I need that value to run a query against my database.  The 2nd query is actually a query outside of APEX, in Oracle though, so I need to have that value to store, and pass.  It gets more complicated...the report is not an APEX report, it's an Oracle Report 10 report.  That part I can do, if I have the value...
Thanks very much for your response and help.
0
 
LVL 6

Accepted Solution

by:
ianmills2002 earned 500 total points
ID: 39198310
I usually use standard reports in my APEX apps. In there, I can change the column definition to include a link to run some javascript.

e.g. Put this in the HTML Expression of the column definition
<a href="javascript:" onClick="javascript:variant_selected(#MDL_ID#, #MRG_ID#);" title="Click to view Accessories"><u>#VARIANT#</u></a>

That javascript function I will setup to set the value of the page item.

e.g.
function variant_selected(pi_MDL_ID, pi_MRG_ID) {
    $x_Value('P3_MRG_ID', pi_MRG_ID);
    $x_Value('P3_MDL_ID', pi_MDL_ID);
}


I just had a look at the interactive reports. It looks like in the column definition on the report, you may be able to set the value in the Column Link section of the column definition.

I also tried the same functionality and my javascript functionality worked. I put the link into "Link Text" field. Set the target to the same page as the report. I then had to put the Item names into the Item section before the link appeared on the report.
0
 

Author Comment

by:newtoperlpgm
ID: 39211000
Thank you.  
Your solution below worked for me.
I just had a look at the interactive reports. It looks like in the column definition on the report, you may be able to set the value in the Column Link section of the column definition.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now