How can I incorporate a lexical parameter in my report for having the FROM DATE and TO DATE parameter?. Can you Pls let me know of the steps involved in doing the same?

Showing Answers 1 - 3 of 3 Answers

Santosh Mudaliar

  • Nov 24th, 2005
 

Hi

You can write the following code :

Your_lexical_variable :=   ' DBTABLE.columnname BETWEEN ' || '''' || :FROM_DATE || '''' || ' and ' ||'''' || :TO_DATE || ''''

 

hope this helps

 

regards

 

Santosh M

09356628950

  Was this answer useful?  Yes

user_pc

  • Apr 11th, 2006
 

 To use a lexical parameter in the query of your data model, prefix it with a '&' (ampersand)

example SELECT ename FROM emp WHERE &lp_lexical_val

The value of p_lexical_val may be set in the code in a trigger, etc., as follows:

:lp_lexical_val := 'empno = 1111';

or

:lp_lexical_val := 'empno = '||:p_input_val;

where p_input_val may be a report input parameter.

  Was this answer useful?  Yes

Trimbak Mahajan

  • Jul 17th, 2006
 

1) create P_from_date and P_to_date are user bind parameters

2) Create LP_WHERE_CLS lexical parameter.

3) Write below code in the After Parameter Form Trigger

   If :p_from_date is not Null

and :p_to_date is null  then

       LP_WHERE_CLS := 'AND inv.invoice_date = :p_from_date'

elsif  :p_to_date is not null  and

:p_from_date is null then

LP_WHERE_CLS := 'AND inv.invoice_date = :p_to_date'

elsif :p_to_date is not null  

and :p_from_date is not null

LP_WHERE_CLS := 'AND inv.invoice_date Between :p_from_date AND :p_to_date '

end if;

This solution may help user more

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions