Re: Bad bind variable - Oracle Reports v. 9i

From: Jan Gelbrich <j_gelbrich_at_westfalen-blatt.de>
Date: Mon, 23 Feb 2004 10:11:52 +0100
Message-ID: <c1cgak$1ggsp6$1_at_ID-93924.news.uni-berlin.de>


"Amy Herrmann" <aherrman_at_mhp.mercy.net> schrieb im Newsbeitrag news:8f373182.0402201316.2d1f398d_at_posting.google.com...
> 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.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 Received on Mon Feb 23 2004 - 10:11:52 CET

Original text of this message