Tuesday, February 14, 2012

Deny access to report based on identity?

Hi,
I have a report, in which one of the parameters is the users initials.
(windows account).
Is there somehow i can test in the report if the parameter equals this
account - and if not redirect to an error page.
Comes down to : Is it possible to redirect from inside a report - based on
calculations of some sort.
Hope somebody has an answer.. :-)The way i've ended up doing this is taking the parameter and feed it to a
custom code method.
In this method i compares this with the environment.username and a db query.
If not accepted i set the visibility->hidden attribute on my report to true
and display a "Access Denied" textbox instead.
No redirects - but the data is not displayed and that was the primary purpose.
"pnp" wrote:
> Hi,
> I have a report, in which one of the parameters is the users initials.
> (windows account).
> Is there somehow i can test in the report if the parameter equals this
> account - and if not redirect to an error page.
> Comes down to : Is it possible to redirect from inside a report - based on
> calculations of some sort.
> Hope somebody has an answer.. :-)

No comments:

Post a Comment