Solved

Oracle APEX 4 question

Posted on 2013-05-23
4
508 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

785 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