April 10, 2010

Passing Parameter to Report

Example 1: Passing parameters to report

1) Go into the Data Model and then change the query:

select a.*, b.dname

from emp a, dept b

where a.deptno=b.deptno

and a.deptno = :p_deptno

2) Save

3) Re-run the report

4) Now the report will prompt the user to enter Department Number.



Example 2: Passing lexical parameter to report– example 1

1) Go into the Data Model and then change the query:

select a.*, b.dname

from emp a, dept b

where a.deptno=b.deptno

&order_by

2) Save

3) Re-run the report

4) Now the report will prompt the user to enter Lexical parameter. Let say you enter ‘order by dname’ and then run the report.



Example 3: Passing lexical parameter to report – example 2

5) Go into the Data Model and then change the query:

select a.*, b.dname

from emp a, dept b

where a.deptno=b.deptno

&and_cond

6) Save

7) Re-run the report

8) Now the report will prompt the user to enter Lexical parameter. Let say you enter ‘and a.deptno=10’ and then run the report.

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...