I have an interactive report that brings back all marriage records from a table that is using a link column which brings up the record detail i.e. P16_ID in the name column and #ID# in the value column.

How can I group 2 records together so when you click on either the bride or groom record in the interactive report when the form loads it will bring back both the bride and groom details placing the groom's records in the first section of the form and the bride's in the second section of the form.

There are unique column values associated with both the bride and groom records that associates them together. These are wedno, venue and weddate. Also the grooms details always appears before the brides in the sequential number in the database table.

I'm not sure what would be the best where clause to use and where it would actually go in the link column so when you click through from either record in the interactive report it brings back both associated records.

But where (what page and in what section) would the where clause go? In the link column section there is nowhere to specify the where clause

We don't know. Possibly none of it should go anywhere due to the data model being an incorrect representation of the entities involved.

Spot the emerging pattern:

fac586 wrote:

It is not clear from the fragments of information you are providing exactly how (or if) the parties are linked. Please provide create table DDL and sample data INSERT scripts to illustrate this (or reproduce the problem on apex.oracle.com and provide guest developer credentials for the workspace).

It sounds like the data model is incorrect for the relationships you are trying to represent.

Nicolette wrote:

To be more precise in how the where should look like we need to see your datamodel.

The easiest way to do that is to set up an application of what you have so far on apex.oracle.com.

Provide the requested information or set up an example on apex.oracle.com.

INDENT is a shared ID between the groom and bride but its not unique, as another bride and groom may have the same INDENT number. What makes them unique is when the INDENT, INDVENUE and INDDOM columns are combined.

As each bride and groom when they get married their entry goes into a registry book(INDVENUE) in this book each marriage entry (INDENT) shows the the page number/entry that the bride and groom are on in that book along with the date of their marriage (INDDOM)

The structure is very flat file as this is what was extracted from an old legacy system.

I just need to find a way of combining these 3 values so in the link column when clicked into the form from the interactive report it brings back the 2 records (bride and groom) associated with each other.

Could you clarify what you mean by 'header process joint' and I take it you would create this page process on the actual form page where I have created 2 html regions containing the form details for groom in the 1st region and bride in the 2nd region (PAGE 16) and not from the interactive report page where the 'linked to' column is located (PAGE 15).

And the select statement would be like?

SELECT * FROM Marriages

WHERE INDENT = :P16_INDENT

AND

P16_INDVENUE = :P16_INDVENUE

AND

P16_INDDOM = :P16_INDDOM

AND

GENDER = 'M'

and

SELECT * FROM Marriages

WHERE INDENT = :P16_INDENT

AND

P16_INDVENUE = :P16_INDVENUE

AND

P16_INDDOM = :P16_INDDOM

AND

GENDER = 'F'

How would this process statement change so when you click on the 'link column' it knows which SQL statement in the process to run