dbTalk Databases Forums  

Bad bind variable - Oracle Reports v. 9i

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Bad bind variable - Oracle Reports v. 9i in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Amy Herrmann
 
Posts: n/a

Default Bad bind variable - Oracle Reports v. 9i - 02-20-2004 , 03:16 PM






Hello all -

I've just started using Report Builder today, so go easy on me. I'm
trying to suppress a field with null values. Got this example from
the program documentation:

function M_G_DEPTNO1_HDRFormatTrigger return boolean is
begin
if :count_detail=0 then
return (FALSE);
else
return (TRUE);
end if;
end;

This is my actual code:

function B_ADDRESSLINE1FormatTrigger return boolean is
begin
if :count_detail=0 then
return (FALSE);
ELSE
return (TRUE);
end if;
end;

After compiling, I get the REP-0730 error message, "REP-0730. The
following bind variable is not defined: COUNT_DETAIL".

Any suggestions would be appreciated.

Amy Herrmann
aherrman (AT) mhp (DOT) mercy.net

Reply With Quote
  #2  
Old   
Jan Gelbrich
 
Posts: n/a

Default Re: Bad bind variable - Oracle Reports v. 9i - 02-23-2004 , 03:11 AM






"Amy Herrmann" <aherrman (AT) mhp (DOT) mercy.net> schrieb im Newsbeitrag
news:8f373182.0402201316.2d1f398d (AT) posting (DOT) google.com...
Quote:
Hello all -

I've just started using Report Builder today, so go easy on me. I'm
trying to suppress a field with null values. Got this example from
the program documentation:

function M_G_DEPTNO1_HDRFormatTrigger return boolean is
begin
if :count_detail=0 then
return (FALSE);
else
return (TRUE);
end if;
end;

This is my actual code:

function B_ADDRESSLINE1FormatTrigger return boolean is
begin
if :count_detail=0 then
return (FALSE);
ELSE
return (TRUE);
end if;
end;

After compiling, I get the REP-0730 error message, "REP-0730. The
following bind variable is not defined: COUNT_DETAIL".

Any suggestions would be appreciated.

Amy Herrmann
aherrman (AT) mhp (DOT) mercy.net
As the doco is only demo, :count_detail is not yet deckared in *your*
report.
Look at Your Query, wher Your bind variables are defined:

Select
a, b, c ...
From [yourTable]
Where [yourConditions]

Then You have bind variables :a, :b, :c.

And so your code becomes

function B_xyzFormatTrigger return boolean is
begin
if :a=0 then
return (FALSE);
ELSE
return (TRUE);
end if;
end;

And if You want to have counts whatsoever,
set aliases:

Select
a, b, c,
Count(c) count_c
....

Then You have a bind variable :count_c to deal with.

hth, Jan






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.