Home » Developer & Programmer » Reports & Discoverer » Master Detail Report, If there is no record in detail table (Forms6, Report6)
Master Detail Report, If there is no record in detail table [message #492975] Fri, 04 February 2011 00:21 Go to next message
isohail
Messages: 7
Registered: February 2011
Location: Pakistan
Junior Member
Hello Experts

I am Developing a Master Detail Report from the query

SELECT faccounts.hgfcode, faccounts.detail,
sum(debit) as Sdebit,sum(credit) as Scredit from FACCOUNTS,VMASTER,VDETAIL
Where faccounts.hgfcode=vdetail.hgfcode and
VMASTER.VRNO= VDETAIL.VRNO
group by faccounts.hgfcode, faccounts.detail

My problem is if Vdetail table is empty or there is no related record. then I am unable to see that record in report even if i add or subtract some other values to sdebit, or scredit

for Example I created a formula column i.e

function DBalFormula return Number is
begin
IF (:cf_2+:Sdebit-:Scredit)<0 THEN
RETURN('');
ELSE
RETURN (:cf_2+:Sdebit-:Scredit);
END IF;
end;


Re: Master Detail Report, If there is no record in detail table [message #492979 is a reply to message #492975] Fri, 04 February 2011 00:50 Go to previous messageGo to next message
Littlefoot
Messages: 21572
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OUTER JOIN might be what you need.
Re: Master Detail Report, If there is no record in detail table [message #492997 is a reply to message #492979] Fri, 04 February 2011 03:52 Go to previous message
isohail
Messages: 7
Registered: February 2011
Location: Pakistan
Junior Member
Oh Thanx Littlefoot
My Problem is solved with the help of you
Previous Topic: Order by problem - please help
Next Topic: ORA-01031:Insufficeint Privileges
Goto Forum:
  


Current Time: Thu Jul 02 11:42:41 CDT 2020