SundancerKid
Programmer
Hi All,
I am working with
--> Business Objects XI R2 (View Crystal Report using InfoView)
--> Business Views XI R2 ( access the data using Oracle 10g ) building LOV location table with the
proper access to the location(s) they have to.
--> Crystal Reports XI R2 (Database connection is the Business View)
I need to pass the BO User ID of the person running the report to the Oracle db.
Any suggestions would be greatly appreciated.
====================================================
I am working with 2 tables
--> LOCATION_SECURITY.SECURITY_ALL_LOCATIONS
--> LOCATION_SECURITY.SECURITY_FOLDER_LOCATION
If they exist in the LOCATION_SECURITY.SECURITY_ALL_LOCATIONS table then give them access to all locations also I want to display ...ALL value at the top of the LOV.
If they exist in the LOCATION_SECURITY.SECURITY_FOLDER_LOCATION table then give them access to all only the locations they have access to I DO NOT want to display the ...ALL value at the top of the LOV.
Proposed Oracler View
I am working with
--> Business Objects XI R2 (View Crystal Report using InfoView)
--> Business Views XI R2 ( access the data using Oracle 10g ) building LOV location table with the
proper access to the location(s) they have to.
--> Crystal Reports XI R2 (Database connection is the Business View)
I need to pass the BO User ID of the person running the report to the Oracle db.
Any suggestions would be greatly appreciated.
====================================================
I am working with 2 tables
--> LOCATION_SECURITY.SECURITY_ALL_LOCATIONS
--> LOCATION_SECURITY.SECURITY_FOLDER_LOCATION
If they exist in the LOCATION_SECURITY.SECURITY_ALL_LOCATIONS table then give them access to all locations also I want to display ...ALL value at the top of the LOV.
If they exist in the LOCATION_SECURITY.SECURITY_FOLDER_LOCATION table then give them access to all only the locations they have access to I DO NOT want to display the ...ALL value at the top of the LOV.
Proposed Oracler View
Code:
Select @variable('BOUSER'), 99999 as Folder, '...ALL' as Location, 'All Locatiions' as Description
From dual
where (select Q.User_ID from LOCATION_SECURITY.SECURITY_ALL_LOCATIONS
where Q.User_ID = @variable('BOUSER')) Is not null
UNION
Select C.User_ID, 99999 as Folder, B.Location, B.LocationName
From medgate_v60_app.MT_TBLLOCATION B left join
LOCATION_SECURITY.SECURITY_ALL_LOCATIONS C on C.User_ID = @variable('BOUSER')
UNION
Select D.User_ID, D.Folder_ID, D.Location, E.LocationName
from LOCATION_SECURITY.SECURITY_FOLDER_LOCATION D Left Join
medgate_v60_app.MT_TBLLOCATION E on D.Location = E.location
WHERE
D.Folder_ID in (SELECT O.REAL_FOLDER_ID FROM LOCATION_SECURITY.FOLDER_MAPPING O)
and @variable('BOUSER')