Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Bind Variables in SQL*Reports 2.5
The reason that your are having a problem is that although you have created a field named 'f_alpha', there is no data source for the field as of yet. The underlying data source must be defined either in the DATA MODEL (through a database column, formula column, summary column, etc.) or as a PARAMETER (either system parameter or user-defined parameter).
Once that column or parameter is created (in cannot be the same name as the field), you can reference it in your trigger. The column or parameter can then be defined as the SOURCE for the field on the layout editor. In essence the 'field' on the layout editor is just a container that is linked to an item in the DATA MODEL through the SOURCE property.
The naming conventions that we use are as follows...
SELECT USER INTO :USERNAME FROM DUAL;
Hope this helps...
D. Shah wrote:
>
> Hi,
>
> I've just started using SQL*Reports 2.5 and have experienced problems
> with using bind variables.
>
> I created a field called 'f_alpha' and placed it on the layout editor.
> My objective was to attach a trigger to another (database) field
> (say...f_beta).
>
> This trigger has a simple select clause:
>
> select something
> into :f_alpha
> from table1
> where first_column = :f_beta;
>
> Compiling this gives me an error stating that :f_alpha is a BAD bind
> variable. I know
> that in SQL*Forms you have to attach the block name but SQL*Reports
> 2.5 does not
> include blocks. Can anyone figure out what I am doing wrong and
> hence, what I should do
> to rectify this problem?
>
> Many Thanks in Advance!
>
> Dipen
-- ___ ___ ___ ___ ___ ____ ___ ___ ___ _ _ _ _ _ ___ ___ ___ | _ \ | _ \ __| _ \ _| | __| __| _ \ \| |/ \ | \| | \ __|/ __/ | _/ | | _ < _|| _/| | | _|| _|| _/ | _ \| | | | _| \__ \ |_|_\___|___/___|_|_\|_| |_| |___|_|_\_|\_|/ \_\_|\_|___/___|/___/ ******************************************************************** Robert Fernandes - LLNL AIS Dept Phone: (510) 423-1397 Fax: (510) 423-5882 Email: rfernand_at_llnl.gov - or - fernandes6_at_llnl.gov ********************************************************************Received on Mon Feb 09 1998 - 00:00:00 CST
![]() |
![]() |