Home » Developer & Programmer » Reports & Discoverer » adding & before parameter name in data model (10g R2)
adding & before parameter name in data model [message #681293] Sun, 05 July 2020 02:35 Go to next message
7anona
Messages: 72
Registered: February 2012
Member
hi all

what does it mean when there is & before parameter name in report data model
Re: adding & before parameter name in data model [message #681294 is a reply to message #681293] Sun, 05 July 2020 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 21598
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I can't imagine what you are asking. Could you post a screenshot which illustrates the question, please?
Re: adding & before parameter name in data model [message #681325 is a reply to message #681294] Wed, 08 July 2020 04:27 Go to previous messageGo to next message
7anona
Messages: 72
Registered: February 2012
Member
I am tryng to modify one report
in the data model of the report in where condition
there are multiple and conditions and then &parameter1.
parameter1 is listed in the user parameter of the report

what does it mean to have &parameter1 in where condition

I have to understand this in order to modify my report

thank you for your reply
Re: adding & before parameter name in data model [message #681334 is a reply to message #681325] Wed, 08 July 2020 15:53 Go to previous messageGo to next message
Littlefoot
Messages: 21598
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Aha. That's a lexical parameter.

Unlike "ordinary" parameters which are referenced with a colon sign, e.g.
select ename
from emp
where empno = :par_empno
lexical parameters allow you to compose the whole piece of a statement. That's usually done in the After Parameter Form trigger. Report accepts some parameter and - based on its value - creates a lexical parameter. For example, suppose you pass 7984 as PAR_EMPNO. Then you can do this:
:parameter1 := 'where empno = ' || :par_empno
and use it in report's query as
select ename
from emp
&parameter1
At runtime, it (&parameter1) is substituted by the value you created in the After Parameter Form trigger so it finally becomes
select ename
from emp
where empno = 7984
It is well described in Reports Online Help system; search for "lexical".
Re: adding & before parameter name in data model [message #681336 is a reply to message #681334] Wed, 08 July 2020 23:15 Go to previous messageGo to next message
7anona
Messages: 72
Registered: February 2012
Member
got it
found it in After Parameter Form trigger.

thank you
Re: adding & before parameter name in data model [message #681337 is a reply to message #681336] Thu, 09 July 2020 04:57 Go to previous message
Littlefoot
Messages: 21598
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You're welcome.
Previous Topic: Oracle ap invoice aging report custom one
Next Topic: UNION returns 2 records for Same ID
Goto Forum:
  


Current Time: Tue Sep 29 06:10:17 CDT 2020