Home » Developer & Programmer » Reports & Discoverer » Zero to Replace Null Value in Report
Zero to Replace Null Value in Report [message #89808] Fri, 30 July 2004 21:49 Go to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
I had writen a format trigger for field F_1 which source is DMAY which i had created in User Paramater with initial value 0.

function F_1FormatTrigger return boolean is
begin
if :may is null then
return (TRUE);
else
return(false);
end if;
end;

So if may column is null then 0 should appear.

Am i wrong anywhere.Pl. help

Thanks
Re: Zero to Replace Null Value in Report [message #89812 is a reply to message #89808] Sat, 31 July 2004 21:41 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
This function you wrote will display F_1 only is F_1 is null. In a format-trigger a return value TRUE means "print this"; FALSE means "do not print this".

You could change your query, so that you select nvl(DMAY, 0). This will print a zero whenever dmay is null.
Of course, I cannot predict whether this will be possible in your report.

hth
Re: Zero to Replace Null Value in Report [message #89816 is a reply to message #89808] Mon, 02 August 2004 03:43 Go to previous message
Karthik
Messages: 63
Registered: February 2000
Member
Hi,

In IF condition change :may to :dmay and then
change the DMAY(User parameter) datatype to Character.
Two things you have to clear is,
1. If you assign to null, then the datatype has to be character.
2. if you assign to zero, then the datatype has to be Number.
Previous Topic: anchor object
Next Topic: Urgent:9i Reports User Parameter
Goto Forum:
  


Current Time: Sun Apr 28 06:37:01 CDT 2024