Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Reports Developer - Before Report Trigger

Re: Oracle Reports Developer - Before Report Trigger

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 8 Sep 2005 13:32:57 -0700
Message-ID: <43209ff9$1@news.victoria.tc.ca>


Matthias Kleinicke (Matthias.Kleinicke_at_gmx.de) wrote:
: Hi Wes,

: Wes schrieb:
: > Questions:
: > (1) Is there some way to reference "this" report object so I can get
: > the sql that is generated from my two sql queries and two data links so
: > I can put it in a string variable to run the sql that way?
: I do not know of such a way. Even if it would be possible I would not
: try to do this.
: > (2) Or do I have to find a equivalent single SQL statement of what ever
: > sql is generated from the two sql queries and two data links?
: > If this is so, could you lead me in the right direction. My two
: > datalinks are described below
: >
: > ------------------------------------------------------------------
: > -- Data links - Note that G_A is a group within my 1st query
: > -------------------------------------------------------------------
: > Data link #1 = [ WHERE G_A.CODE = UNION_QRY.CODE1 ]
: > Data link #2 = [ WHERE G_A.CODE_TYPE = UNION_QRY.CD_TYP ]
: >
: The SQL You are looking for is as simple as
: select count(*)
: from (select_a) G_A, (select_b) UNION_QRY
: where g_a.code = union_qry and g_a.code_type = union_qry.cd_type
: where select_a and select_b are the statements of the two queries.

How did you know that except by guessing (albeit, an educated guess)?

Was there some way to get the report writer to tell you that that was what it was going to use, or is it documented somewhere?

I ask because I too in the past wanted to get this sort of detail from the report instead of figuring it out myself. One problem with figuring out the query yourself is that if some one changes the report then they also have to change the initial query, which is a potential source of error, especially since the hand written query may appear to work just fine with no changes (but be incorrect for the report as a whole).

??

--

This programmer available for rent.
Received on Thu Sep 08 2005 - 15:32:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US