Seems to be a simple problem. I have and grouped report where I want to see all facilities on a address.
For example:
Grouped View
Detail View
How to achieve this when we do not have a primary key and our key column includes commas which breaks the link. We easily generate an own ID column via an analytical function. In both reports we use an Oracle view to get the data from and our view looks like that:
The grouped report looks like that:
That's it.
For example:
Grouped View
Edit | Address | Amount of facilities |
x | Germany, Dresden, Dresdner Strasse 1 | 2 |
x | Germany, Frankfurt, Frankfurter Strasse 1 | 3 |
Detail View
Address | Facility |
Germany, Dresden, Dresdner Strasse 1 | Computer System EXAXY |
Germany, Dresden, Dresdner Strasse 1 | Computer System KI |
Germany, Frankfurt, Frankfurter Strasse 1 | Manufactoring System 007 |
Germany, Frankfurt, Frankfurter Strasse 1 | Manufactoring System 009 |
Germany, Frankfurt, Frankfurter Strasse 1 | Manufactoring System 028 |
How to achieve this when we do not have a primary key and our key column includes commas which breaks the link. We easily generate an own ID column via an analytical function. In both reports we use an Oracle view to get the data from and our view looks like that:
select facility_address,Via the function dense_rank and the partition by facility_address we get an unique ID for all facilities based on the address.
facility_name,
dense_rank() over (order by facility_address) as facility_id
from facilities
The grouped report looks like that:
select facility_id,The detail report looks like that
facility_address,
count(facility_name) as amount_of_facilities
from facilities
select facility_address,Now you need to add a link in the report attributes section inside the grouped report. We set the item :P2_FACILITY_ID with our column #FACILITY_ID#.
facility_name
from facilities
where facility_id = :P2_FACILITY_ID
That's it.