Re: Oracle Report : Parent only if Child exists
From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 18 Dec 2006 09:04:44 -0800
Message-ID: <1166461484.270877_at_bubbleator.drizzle.com>
>>> Hi,
>>> I'm new to Oracle Reports. I work as a Software Engineer. Currently
>>> i've been given assignment to develop a report using Oracle Report
>>> Builder 10g. It is a Master-Detail report. The parent query brings
>>> Master records and child query (quite complex) brings the Details. The
>>> report is showing all parent records even if child records do not
>>> exist. I only want those parent record displayed which have child
>>> records. What is the best way to achieve this through the Builder. Or
>>> do I have to change the Parent query and add extra conditions ?
>>>
>>> any help will be appreciated.
>>>
>>> thx.
>>>
Date: Mon, 18 Dec 2006 09:04:44 -0800
Message-ID: <1166461484.270877_at_bubbleator.drizzle.com>
What's in a namespace wrote:
> "Gerard H. Pille" <ghp_at_skynet.be> schreef in bericht > news:4583064e$0$21494$ba620e4c_at_news.skynet.be... >> Abu Hamza wrote:
>>> Hi,
>>> I'm new to Oracle Reports. I work as a Software Engineer. Currently
>>> i've been given assignment to develop a report using Oracle Report
>>> Builder 10g. It is a Master-Detail report. The parent query brings
>>> Master records and child query (quite complex) brings the Details. The
>>> report is showing all parent records even if child records do not
>>> exist. I only want those parent record displayed which have child
>>> records. What is the best way to achieve this through the Builder. Or
>>> do I have to change the Parent query and add extra conditions ?
>>>
>>> any help will be appreciated.
>>>
>>> thx.
>>>
>> If checking if children exist, is complex, then I'd modify the report. But >> I haven't touched reports this century, although I'm quite sure that RTFM >> will help you out. > > I'd create a view for the master, containing ONLY those records that have > child records (may be a performance killer though) > and base the report on this view. > > Shakespeare > (what's in a master?)
Not a recommendation ... but a materialized view might be a better choice.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Dec 18 2006 - 18:04:44 CET