Monday 1 August 2011

Is prompted Vs Presntation variable and Protect Filter


Both “Is prompted” and Presentation variable will do the same work, i.e Pass value from prompt to report. But there is a slight difference in between. Let me discuss on the same.. 

Isprompted
Create a prompt using “Employee.ename”.
 
Create a report with "Office.oname"(Office Name),  "Employee.ename"(Employee Name),"Employee.salary" (Salary) as a columns.Add filter
where Employee Name taken from "Employee.ename".

 
Get the prompt and report into dashboard. Now change ename to ‘E1/kumar’, then the report filter out according to ‘E1/kumar’.

 

Let the columns in the report remains same, we will change the filter condition now. Let us take “Office.ename” is prompted.

 
Now you can observe that, if you change ename to ‘E1/Kumar’ then also the report is not filtering according to passed values.

 
Reason: If the prompt column and the column, which used in the filter (for a report) are taken from the same table, then Is prompted will work.
Presentation variable
Create a presentation variable called name for the column “Employee.ename”.
 
  Now, in the report change the filter "Employee.ename" to "Office.ename" and use presentation variable.
 

 
Login as ‘kumar’. By default prompt shows ‘kumar’,because we used session variable as default value. If you change ename as ‘kumar/E1’ then the report is filtered according to value passed.





Protect Filter
Use session variable in the report filter.

  Login as ‘kumar’, by default prompt value is ‘kumar’, because we used session variable as a default value. If you change the ename to ‘E1’ then the report also filters out according ‘E1’. But user is not expected that.
 
Now give protection to the filter i.e apply ‘Protect Filter’.

 
Now login as ‘kumar. If you chage ename to ‘E1’also the report won’t be filtered out according to the value ('E1') passed.

Reason: Protect Filter will not allow override, hence by default only the value which is defined in the filter of the report will be passed as a value and hence you can see only "kumar’s" data is showing above, even if you change prompt to "E1"still "kumar’s" data is showing up in the report.





2 comments:

  1. hi, kumaraswami first of all my hearty congratulation to u, i have suggestion for you(sorry if iam wrong)the images r too small and the font in the images are also not visible. so try to make it big friend?
    plz send the above post to mail id
    girishvictory@gmail.com
    and i am also writing some blog on oracle , plz check and share some feedback ....!

    ReplyDelete
  2. Hi Girish...

    Click on the images.U can get the clear picture.

    ReplyDelete