Reports 3:Dynamic Query Fails When Tables Join Change From What It Initially Is In the User Parameter.

From: Adam Tadjkarimi <adamt_at_hsltd.com>
Date: Fri, 7 May 1999 11:37:27 -0500
Message-ID: <7gv4j0$iu9$1_at_newsin-1.starnet.net>



I use a user parameter, :P_Dynamic, in one of the report SQLs as:

SELECT &P_Dynamic

And the initial value of this parameter is set to

a.col_x col_x2, a.col_y col_y2 FROM tab_a a, tab_b WHERE a.col_x=b.col_x

This works fine as long as the initial value remains as is, but depending on the user selection in the parameter form this can change in the AFTERPFORM report trigger to:

a.col_x col_x2, a.col_y col_y2 FROM tab_a a

Once this happens it fails and I get the error message:

ORA000904 invalid column name
SELECT a.col_x col_x2, a.col_y col_y2 FROM tab_1 a WHERE (:col_x3 =col_x2)

I should add that :col_x3 is the Datalink column from the parent query.

Any ideas why this is happening any hints to correct it or work around?

Thank,
Adam Tadj
Adamt_at_hsltd.com Received on Fri May 07 1999 - 18:37:27 CEST

Original text of this message