Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
How to reference an interactive report row column & value

I want to have 2 interactive reports on the same page, one after the other.
I am having trouble getting the 2nd report SQL statement to use the value of one of the columns of the currently highlighted row.
Taking DEPT & EMP tables data as example:
The first report SQL statement:
select deptno, dname from dept;
The 2nd report SQL statement:
select ename, job, mgr, sal from emp where deptno=[first report deptno];
How do I reference the 1st report, its row & column & the value there in?
Answers
-
A number of ways, here is one
- Create hidden item: P1_DEPTNO
- In your Dept region, make Deptno a Link column
- Set the link target as url: javascript:$s('P1_DEPTNO, #DEPTNO#);
- Set the link text as: #DEPTNO#
- Create on change dynamic action on P1_DEPTNO
- Add action to refresh Emp report
- In your Emp region, set Page Items To Submit: P1_DEPTNO
You may also be interested in
Grassroots Oracle: Tutorial: Include action button in report
-
Hi,
I would consider rendering a radiogroup on your master report as it's obvious which row is currently selected and you can easily select some value on page-load if needed. So the setup would be:
master report based on the following select
select apex_item.radiogroup(p_idx => 1, p_value => deptno, p_selected_value =>:p1_selected_dept, p_onchange => '$s(''P1_SELECTED_DEPT'',this.value)') as select_dept, dname as dname, loc as locfrom dept
page item P1_SELECTED_DEPT (hidden with Value Protected = No) and a detail report based on
select * from emp where deptno = :p1_selected_dept
Page Item(s) to submit: P1_SELECTED_DEPT
and a Refresh DA fired on P1_SELECTED_DEPT change event.
Here https://apex.oracle.com/pls/apex/f?p=55379:1:3789963144266::::: is a working example and if you wanted to examine it, login to my workspace
ws: pp_test
user: test
pwd: test
Application 55379 - DA_on_IR
Regards,
Pavel